diff options
author | Jerome Guitton <guitton@adacore.com> | 2007-09-17 14:53:05 +0000 |
---|---|---|
committer | Jerome Guitton <guitton@adacore.com> | 2007-09-17 14:53:05 +0000 |
commit | eff4f95e29ab873b801945b3e6478089b0c1a934 (patch) | |
tree | 4216e6b1916c976b48abe8df499e9db4d627f459 /gdb/dwarf2loc.c | |
parent | 916af0488c5c7f741cf92deb73451d3072b4e64e (diff) | |
download | gdb-eff4f95e29ab873b801945b3e6478089b0c1a934.zip gdb-eff4f95e29ab873b801945b3e6478089b0c1a934.tar.gz gdb-eff4f95e29ab873b801945b3e6478089b0c1a934.tar.bz2 |
* dwarf2loc.c (dwarf_expr_frame_base): Guard against NULL.
* Makefile.in (dwarf2loc.o): Depend on gdb_assert.h.
Diffstat (limited to 'gdb/dwarf2loc.c')
-rw-r--r-- | gdb/dwarf2loc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c index 81b2f87..76d7f6e 100644 --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c @@ -37,6 +37,7 @@ #include "dwarf2loc.h" #include "gdb_string.h" +#include "gdb_assert.h" /* A helper function for dealing with location lists. Given a symbol baton (BATON) and a pc value (PC), find the appropriate @@ -145,6 +146,11 @@ dwarf_expr_frame_base (void *baton, gdb_byte **start, size_t * length) framefunc = get_frame_function (debaton->frame); + /* 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, + something has gone wrong. */ + gdb_assert (framefunc != NULL); + if (SYMBOL_OPS (framefunc) == &dwarf2_loclist_funcs) { struct dwarf2_loclist_baton *symbaton; |