This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] dwarf2loc.c, loclist_read_variable, Assert frame not null
- From: Michael Snyder <msnyder at vmware dot com>
- To: Pedro Alves <pedro at codesourcery dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Fri, 04 Mar 2011 16:11:54 -0800
- Subject: Re: [RFA] dwarf2loc.c, loclist_read_variable, Assert frame not null
- References: <4D7169A9.4000207@vmware.com> <201103050000.54438.pedro@codesourcery.com>
Pedro Alves wrote:
On Friday 04 March 2011 22:37:29, Michael Snyder wrote:
+ gdb_asert (frame);
Please make sure patches compile before posting them.
My bad.
Corrected patch attached.
2011-03-04 Michael Snyder <msnyder@vmware.com>
* dwarf2loc.c (loclist_read_variable): Assert frame not null.
Index: dwarf2loc.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2loc.c,v
retrieving revision 1.110
diff -u -p -u -p -r1.110 dwarf2loc.c
--- dwarf2loc.c 27 Feb 2011 00:01:12 -0000 1.110
+++ dwarf2loc.c 4 Mar 2011 22:34:24 -0000
@@ -2687,8 +2687,11 @@ loclist_read_variable (struct symbol *sy
set_value_optimized_out (val, 1);
}
else
- val = dwarf2_evaluate_loc_desc (SYMBOL_TYPE (symbol), frame, data, size,
- dlbaton->per_cu);
+ {
+ gdb_assert (frame);
+ val = dwarf2_evaluate_loc_desc (SYMBOL_TYPE (symbol), frame,
+ data, size, dlbaton->per_cu);
+ }
return val;
}