diff options
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; |