diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 1991-04-22 20:08:53 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 1991-04-22 20:08:53 +0000 |
commit | 777bef06cd075ee4031187fe28381d5d5edd4f94 (patch) | |
tree | 0ca9c4eaec086bb1a36e3ae9a7f6f29757612ca7 /gdb/breakpoint.c | |
parent | fcb887ffcd896af0b53c7ac8808bfeed54b321e8 (diff) | |
download | gdb-777bef06cd075ee4031187fe28381d5d5edd4f94.zip gdb-777bef06cd075ee4031187fe28381d5d5edd4f94.tar.gz gdb-777bef06cd075ee4031187fe28381d5d5edd4f94.tar.bz2 |
Check for NULL selected_frame in various places.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r-- | gdb/breakpoint.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c index e5d3c69..e3f5152 100644 --- a/gdb/breakpoint.c +++ b/gdb/breakpoint.c @@ -1537,14 +1537,22 @@ get_catch_sals (this_level_only) { extern struct blockvector *blockvector_for_pc (); register struct blockvector *bl; - register struct block *block = get_frame_block (selected_frame); + register struct block *block; int index, have_default = 0; - struct frame_info *fi = get_frame_info (selected_frame); - CORE_ADDR pc = fi->pc; + struct frame_info *fi; + CORE_ADDR pc; struct symtabs_and_lines sals; struct sal_chain *sal_chain = 0; char *blocks_searched; + /* Not sure whether an error message is always the correct response, + but it's better than a core dump. */ + if (selected_frame == NULL) + error ("No selected frame."); + block = get_frame_block (selected_frame); + fi = get_frame_info (selected_frame); + pc = fi->pc; + sals.nelts = 0; sals.sals = NULL; |