Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Re: [PATCH] Accept DWARF 3-format debug info
@ 2006-06-09 23:18 David Anderson
  0 siblings, 0 replies; 13+ messages in thread
From: David Anderson @ 2006-06-09 23:18 UTC (permalink / raw)
  To: Daniel Jacobowitz; +Cc: Jimb, julian, gdb-patches

Damiel writes, about a supposed change in DW_FORM_ref_addr:

>References that use the attribute form DW_FORM_ref_addr are specified
        >to be four bytes in the DWARF 32-bit format and eight bytes in
        the
        >DWARF 64-bit format, while DWARF Version 2 specifies that such
        >references have the same size as an address on the target
        system >(see Sections 7.4 and 7.5.4).
        
        
This is a correct observation, but *the dwarf 2 document was wrong*.

We did this late in 1992 and simply botched the document.
Confusion and tiredness :-(
Same size as an address simply makes no sense, never did.

Till very recently I don't think anyone used DW_FORM_ref_addr.
I did get an inquiry from one person (about dwarfdump) that proved
one compiler supplier believes the dwarf2 document on this point. Recent
inquiry, I mean.

There should still be  FAQ on dwarf.freestandards.org which
says the DWARF2 doc was/is wrong (I wrote that FAQ).

What the dwarf3 doc says is what we always intended. It's an offset,
not an address. Misleading name of the form...

David Anderson (davea@sgi.com, writing from home)


^ permalink raw reply	[flat|nested] 13+ messages in thread
* [PATCH] Accept DWARF 3-format debug info
@ 2006-06-08 22:48 Julian Brown
  2006-06-08 23:25 ` Jim Blandy
  0 siblings, 1 reply; 13+ messages in thread
From: Julian Brown @ 2006-06-08 22:48 UTC (permalink / raw)
  To: gdb-patches; +Cc: Daniel Jacobowitz, Julian Brown

[-- Attachment #1: Type: text/plain, Size: 810 bytes --]

Hi,

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?

Cheers,

Julian

ChangeLog (Daniel Jacobowitz):

     * gdb/dwarf2read.c (partial_read_comp_unit_head): Accept version 3.

[-- Attachment #2: arm-dwarf3.patch --]
[-- Type: text/x-patch, Size: 600 bytes --]

Index: src/gdb/dwarf2read.c
===================================================================
--- 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));

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2006-06-18  4:40 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-09 23:18 [PATCH] Accept DWARF 3-format debug info David Anderson
  -- strict thread matches above, loose matches on Subject: below --
2006-06-08 22:48 Julian Brown
2006-06-08 23:25 ` Jim Blandy
2006-06-08 23:59   ` Daniel Jacobowitz
2006-06-18  1:10     ` Mark Kettenis
2006-06-18  4:40       ` Jim Blandy
2006-06-09  7:29   ` Eli Zaretskii
2006-06-09 12:25     ` Daniel Jacobowitz
2006-06-09 16:42       ` Eli Zaretskii
2006-06-09 17:20         ` Daniel Jacobowitz
2006-06-09 19:46           ` Eli Zaretskii
2006-06-09 12:39     ` Julian Brown
2006-06-09 16:39       ` Eli Zaretskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox