diff options
author | Hui Zhu <teawater@gmail.com> | 2012-12-06 01:11:32 +0000 |
---|---|---|
committer | Hui Zhu <teawater@gmail.com> | 2012-12-06 01:11:32 +0000 |
commit | c90a077350e441ae527b16a62719b1f2402ad9b4 (patch) | |
tree | ea99131b57728b5b2482483cd3db6b384b807a35 | |
parent | 8fbb09e83e588193462a3c488466cb4d1a80ba98 (diff) | |
download | gdb-c90a077350e441ae527b16a62719b1f2402ad9b4.zip gdb-c90a077350e441ae527b16a62719b1f2402ad9b4.tar.gz gdb-c90a077350e441ae527b16a62719b1f2402ad9b4.tar.bz2 |
* dwarf2loc.c (dwarf_expr_frame_base): Add check for the return value of get_frame_block.
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/dwarf2loc.c | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c7a8346..cc89930 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2012-12-06 Hui Zhu <hui_zhu@mentor.com> + + * dwarf2loc.c (dwarf_expr_frame_base): Add check for the return + value of get_frame_block. + 2012-12-05 Pierre Muller <muller@sourceware.org> Avoid memory leaks on struct cmd_list_element.doc field. diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c index cadcc17..0f8e9af 100644 --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c @@ -332,11 +332,15 @@ dwarf_expr_frame_base (void *baton, const gdb_byte **start, size_t * length) this_base method. */ struct symbol *framefunc; struct dwarf_expr_baton *debaton = (struct dwarf_expr_baton *) baton; + struct block *bl = get_frame_block (debaton->frame, NULL); + + if (bl == NULL) + error (_("frame address is not available.")); /* Use block_linkage_function, which returns a real (not inlined) function, instead of get_frame_function, which may return an inlined function. */ - framefunc = block_linkage_function (get_frame_block (debaton->frame, NULL)); + framefunc = block_linkage_function (bl); /* If we found a frame-relative symbol then it was certainly within some function associated with a frame. If we can't find the frame, |