[patch] 1/3: Fix crash on DW_OP_fbreg w/o DW_AT_frame_base
Jan Kratochvil
jan.kratochvil@redhat.com
Mon Apr 28 14:13:00 GMT 2008
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
-------------- next part --------------
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)
More information about the Gdb-patches
mailing list