* dwarf2loc.c (dwarf_expr_frame_base): Guard against NULL.

* Makefile.in (dwarf2loc.o): Depend on gdb_assert.h.
This commit is contained in:
Jerome Guitton
2007-09-17 14:53:05 +00:00
parent 916af0488c
commit eff4f95e29
3 changed files with 12 additions and 1 deletions

View File

@@ -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;