* Makefile.in (dwarf2loc.o): Depend on gdb_assert.h.
+2007-09-17 Jerome Guitton <guitton@adacore.com>
+
+ * dwarf2loc.c (dwarf_expr_frame_base): Guard against NULL.
+ * Makefile.in (dwarf2loc.o): Depend on gdb_assert.h.
+
2007-09-16 Vladimir Prus <vladimir@codesourcery.com>
* mi/mi-cmds.c (mi_cmds): Register -list-features.
dwarf2loc.o: dwarf2loc.c $(defs_h) $(ui_out_h) $(value_h) $(frame_h) \
$(gdbcore_h) $(target_h) $(inferior_h) $(ax_h) $(ax_gdb_h) \
$(regcache_h) $(objfiles_h) $(exceptions_h) $(elf_dwarf2_h) \
- $(dwarf2expr_h) $(dwarf2loc_h) $(gdb_string_h)
+ $(dwarf2expr_h) $(dwarf2loc_h) $(gdb_string_h) $(gdb_assert_h)
dwarf2read.o: dwarf2read.c $(defs_h) $(bfd_h) $(symtab_h) $(gdbtypes_h) \
$(objfiles_h) $(elf_dwarf2_h) $(buildsym_h) $(demangle_h) \
$(expression_h) $(filenames_h) $(macrotab_h) $(language_h) \
#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
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;