diff options
author | Tom Tromey <tromey@redhat.com> | 2011-03-09 14:22:09 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2011-03-09 14:22:09 +0000 |
commit | eb8c062170c9e829851bd89f4443e6c5e2f7309d (patch) | |
tree | 979d094d7622aa18eb213d0dd1bc3b0b25f097b7 /gdb/frame.c | |
parent | eceb0c5f4943501e17f3296e2348789ccba62522 (diff) | |
download | gdb-eb8c062170c9e829851bd89f4443e6c5e2f7309d.zip gdb-eb8c062170c9e829851bd89f4443e6c5e2f7309d.tar.gz gdb-eb8c062170c9e829851bd89f4443e6c5e2f7309d.tar.bz2 |
* 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.
Diffstat (limited to 'gdb/frame.c')
-rw-r--r-- | gdb/frame.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/frame.c b/gdb/frame.c index 36fcefe..bf3ce77 100644 --- a/gdb/frame.c +++ b/gdb/frame.c @@ -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(). */ |