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



Daniel Berlin wrote:
|On Thu, 17 May 2001, Eli Zaretskii wrote:
|
|>
|> On Thu, 17 May 2001, Daniel Berlin wrote:
|>
|> > We should support 64 bit dwarf2 already, for the most part.
|>
|> Since when?
|Well, since about august of last year or something.
|
|The main difference between 64 bit dwarf2, and 32 bit dwarf2, is, of
|course, the offset sizes.
|
|The DWARF2.1 standard says that the cu header's initial length will tell
|us whether we are dealing with 4 byte offsets or 8 byte offsets.
|
|If you look at dwarf2read.c, you'll notice it handles offset sizes of both
|4 and 8.
|read_initial_length takes care of figuring out which offset size we have.
|
|
|> It's possible that I have an outdated tree, in which case I'm sorry for
|> the line noise.


The 64bit dwarf2 that is read by read_initial_length is based on
dwarf 2.1, designed in 2000.  SGI 64bit dwarf2 was designed in
the early 1990's.  SGI made offsets etc 64bit in elf64
(and offsets etc 32bits in elf32).    
(basically we could not bring ourselves to limit dwarf 
offsets to 32 bits in an elf64 file...)

Anyway,  to be correct for IRIX6,  read_initial_length
needs to know it is IRIX elf64 and then
	 /* UNTESTED, NOT ALL THAT NEEDS TO BE DONE probably */
         cu_header->initial_length_size = 8;
         cu_header->offset_size = 8;
at least gives the right sizes.

Ben Gamsa's patch on my website is a crude version of the above
(not suitable for inclusion in gdb, but at least it has the
key changes IRIX6 elf64 dwarf2 requires, for an older gdb).
(patch is not multi-arch.)
See the end of the page
	http://reality.sgi.com/davea/objectinfo.html
(which Eli already noticed).

I'm on vacation all week, but I'll apply Eli's patches
and try out gdb asap.  Hopefully tonight or tomorrow night.
Been kind of behind in email due to vacation.

Regards,
David B. Anderson davea@sgi.com danderson@acm.org http://reality.sgi.com/davea/


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