From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eli Zaretskii To: davea@quasar.engr.sgi.com Cc: ac131313@cygnus.com, jkingdon@engr.sgi.com, gdb@sources.redhat.com Subject: Re: GDB on SGI Irix 6.5 Date: Thu, 17 May 2001 08:58:00 -0000 Message-id: <200105171559.SAA14958@is.elta.co.il> References: <200104200105.SAA29210@quasar.engr.sgi.com> <200104212007.NAA27159@quasar.engr.sgi.com> X-SW-Source: 2001-05/msg00287.html > Date: Sat, 21 Apr 2001 13:07:12 -0700 (PDT) > From: David B Anderson > > 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