This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA] dwarf2loc, guard against null
- From: Jerome Guitton <guitton at adacore dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 17 Sep 2007 14:04:43 +0200
- Subject: [RFA] dwarf2loc, guard against null
get_frame_function can return null; in this case, crash...
OK to apply?
2007-09-17 Jerome Guitton <guitton@adacore.com>
* dwarf2loc.c (dwarf_expr_frame_base): Guard against NULL.
Index: dwarf2loc.c
===================================================================
--- dwarf2loc.c (revision 14570)
+++ dwarf2loc.c (working copy)
@@ -151,6 +151,9 @@ dwarf_expr_frame_base (void *baton, gdb_
framefunc = get_frame_function (debaton->frame);
+ if (!framefunc)
+ error (_("No frame function."));
+
if (SYMBOL_OPS (framefunc) == &dwarf2_loclist_funcs)
{
struct dwarf2_loclist_baton *symbaton;