This is the mail archive of the
mailing list for the GDB project.
[PATCH] Accept DWARF 3-format debug info
- From: Julian Brown <julian at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Daniel Jacobowitz <dan at codesourcery dot com>, Julian Brown <julian at codesourcery dot com>
- Date: Thu, 08 Jun 2006 23:48:00 +0100
- Subject: [PATCH] Accept DWARF 3-format debug info
This is part of a series of patches from a CodeSourcery branch which
enable the output of ARM's RVCT 2.2 compiler to be debugged with gdb.
ARMCC's support for DWARF 3 is superior to its DWARF 2 support, and GDB
apparently supports much of DWARF 3 already. This patch allows DWARF 3
format debug info to be accepted by gdb.
(Some things are notably missing from the DWARF 3 support -- one thing
I've noticed so far is lack of support for DW_TAG_partial_unit, but RVDS
2.2 doesn't seem to need that. A couple of other minor things will be
addressed in followup patches.)
Tested with cross to arm-none-eabi, and natively on
x86_64-unknown-linux-gnu. OK to apply on mainline?
ChangeLog (Daniel Jacobowitz):
* gdb/dwarf2read.c (partial_read_comp_unit_head): Accept version 3.
--- src.orig/gdb/dwarf2read.c 2005-03-01 12:09:19.000000000 -0800
+++ src/gdb/dwarf2read.c 2005-03-07 06:00:16.000000000 -0800
@@ -1312,7 +1312,7 @@ partial_read_comp_unit_head (struct comp
info_ptr = read_comp_unit_head (header, info_ptr, abfd);
- if (header->version != 2)
+ if (header->version != 2 && header->version != 3)
error (_("Dwarf Error: wrong version in compilation unit header "
"(is %d, should be %d) [in module %s]"), header->version,
2, bfd_get_filename (abfd));