This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] 1/3: Fix crash on DW_OP_fbreg w/o DW_AT_frame_base
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 28 Apr 2008 10:34:11 +0200
- Subject: [patch] 1/3: Fix crash on DW_OP_fbreg w/o DW_AT_frame_base
Hi,
very old GCCs produced wrong debug info and GDB HEAD still crashes on it.
GCC PR 19124.
Location list was using DW_OP_fbreg but no DW_AT_frame_base was defined.
No regressions on x86_64.
Regards,
Jan
2008-04-28 Jan Kratochvil <jan.kratochvil@redhat.com>
* dwarf2loc.c (dwarf_expr_frame_base): Error out on missing
SYMBOL_LOCATION_BATON.
--- ./gdb/dwarf2loc.c 26 Mar 2008 14:53:28 -0000 1.50
+++ ./gdb/dwarf2loc.c 28 Apr 2008 00:26:50 -0000
@@ -166,8 +166,13 @@ dwarf_expr_frame_base (void *baton, gdb_
{
struct dwarf2_locexpr_baton *symbaton;
symbaton = SYMBOL_LOCATION_BATON (framefunc);
- *length = symbaton->size;
- *start = symbaton->data;
+ if (symbaton != NULL)
+ {
+ *length = symbaton->size;
+ *start = symbaton->data;
+ }
+ else
+ *start = NULL;
}
if (*start == NULL)