This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GDB on SGI Irix 6.5


> Date: Sat, 21 Apr 2001 13:07:12 -0700 (PDT)
> From: David B Anderson <davea@quasar.engr.sgi.com>
> 
> n32 and 64 use dwarf2 debug information.
> For -64 IRIX cc/CC/etc dwarf2 has 64bit offsets and lengths
> (which goes beyond the literal dwarf2 standard -- 
> when using elf64 we decided to use 64bit offsets in dwarf in case
> a section got beyond what 32bits could address).
> 
> Because of the dwarf2-by-IRIX difference from standard dwarf2
> a multi-arch for IRIX -64 using IRIX dwarf2-64 seems necessary,
> but that is a separate topic

Okay, I'm now staring at this topic, and it stares right back at me ;-)

Trying to debug a 64-bit executable produces the following error
message:

  Dwarf Error: wrong version in compilation unit header.

This comes from the following fragment in
dwarf2read.c:dwarf2_build_psymtabs_hard:

  while ((unsigned int) (info_ptr - dwarf_info_buffer)
         + ((info_ptr - dwarf_info_buffer) % 4) < dwarf_info_size)
    {
      struct comp_unit_head cu_header;
      beg_of_comp_unit = info_ptr;
      info_ptr = read_comp_unit_head (&cu_header, info_ptr, abfd);

      if (cu_header.version != 2)
        {
          error ("Dwarf Error: wrong version in compilation unit header.");
          return;
        }

Debugging GDB with itself, I see that cu_header.version is zero,
probably because of the different format of the dwarf2 info used by
the 64-bit executables.

Where can I find the information about this format, and how it differs
from the standard dwarf2?  "man dwarf" mumbles something about
/usr/share/src/compiler/dwarf/dwarf.v2.mm, but it doesn't exist on
this box, probably because they didn't install some optional package.
Is there any other place to find this document?

TIA


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]