summaryrefslogtreecommitdiff
path: root/gdb/dwarf2loc.c
diff options
context:
space:
mode:
authorHui Zhu <teawater@gmail.com>2012-12-06 01:11:31 +0000
committerHui Zhu <teawater@gmail.com>2012-12-06 01:11:31 +0000
commitf135e2e6d1a455583a364c5356694882970dc36c (patch)
treef0edf1f0f86ce9f0587f05747a2859f1d62bba95 /gdb/dwarf2loc.c
parent2bee92c3777bfb83a32a0658997401014a349c27 (diff)
downloadgdb-f135e2e6d1a455583a364c5356694882970dc36c.tar.gz
* dwarf2loc.c (dwarf_expr_frame_base): Add check for the return value of get_frame_block.
Diffstat (limited to 'gdb/dwarf2loc.c')
-rw-r--r--gdb/dwarf2loc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c
index cadcc17e0bd..0f8e9af6676 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,