gdb/gdb-6.8-gcc35998-ada-memory-trash.patch

19 lines
596 B
Diff

--- ./gdb/dwarf2read.c 4 May 2008 17:27:01 -0000 1.260
+++ ./gdb/dwarf2read.c 4 May 2008 18:26:20 -0000
@@ -6754,7 +6754,14 @@ dwarf2_attr (struct die_info *die, unsig
for (i = 0; i < die->num_attrs; ++i)
{
if (die->attrs[i].name == name)
- return &die->attrs[i];
+ {
+ /* GCC PR ada/35998 workaround. */
+ if (name == DW_AT_byte_size
+ && DW_UNSND (&die->attrs[i]) == 0xffffffff)
+ return NULL;
+
+ return &die->attrs[i];
+ }
if (die->attrs[i].name == DW_AT_specification
|| die->attrs[i].name == DW_AT_abstract_origin)
spec = &die->attrs[i];