mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-17 21:03:55 +08:00
* thread.c (restore_selected_frame): Handle frame_level == -1.
(make_cleanup_restore_current_thread): Use get_selected_frame_if_set. * frame.h (get_selected_frame_if_set): Declare. * frame.c (get_selected_frame_if_set): New function.
This commit is contained in:
@ -1247,6 +1247,14 @@ get_selected_frame (const char *message)
|
||||
return selected_frame;
|
||||
}
|
||||
|
||||
/* If there is a selected frame, return it. Otherwise, return NULL. */
|
||||
|
||||
struct frame_info *
|
||||
get_selected_frame_if_set (void)
|
||||
{
|
||||
return selected_frame;
|
||||
}
|
||||
|
||||
/* This is a variant of get_selected_frame() which can be called when
|
||||
the inferior does not have a frame; in that case it will return
|
||||
NULL instead of calling error(). */
|
||||
|
Reference in New Issue
Block a user