This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[RFA] Handle .gdb_index version 8.
- From: Doug Evans <dje at google dot com>
- To: binutils at sourceware dot org
- Date: Wed, 23 Jan 2013 11:02:41 -0800
- Subject: [RFA] Handle .gdb_index version 8.
Hi.
GDB generates version 8 indices now.
Here's a patch to update the pretty-printer.
Ok to check in?
2013-01-23 Doug Evans <dje@google.com>
* dwarf.c (display_gdb_index): Handle .gdb_index version 8.
Index: dwarf.c
===================================================================
RCS file: /cvs/src/src/binutils/dwarf.c,v
retrieving revision 1.121
diff -u -p -r1.121 dwarf.c
--- dwarf.c 24 Oct 2012 01:59:39 -0000 1.121
+++ dwarf.c 23 Jan 2013 18:58:47 -0000
@@ -5699,7 +5699,7 @@ display_gdb_index (struct dwarf_section
/* Prior versions are obsolete, and future versions may not be
backwards compatible. */
- if (version < 3 || version > 7)
+ if (version < 3 || version > 8)
{
warn (_("Unsupported version %lu.\n"), (unsigned long) version);
return 0;
@@ -5712,6 +5712,10 @@ display_gdb_index (struct dwarf_section
warn (_("Version 5 does not include inlined functions.\n"));
if (version < 7)
warn (_("Version 6 does not include symbol attributes.\n"));
+ /* Version 7 indices generated by Gold have bad type unit references,
+ PR binutils/15021. But we don't know if the index was generated by
+ Gold or not, so to avoid worrying users with gdb-generated indices
+ we say nothing for version 7 here. */
cu_list_offset = byte_get_little_endian (start + 4, 4);
tu_list_offset = byte_get_little_endian (start + 8, 4);