This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: GDB on SGI Irix 6.5
- To: David B Anderson <davea at quasar dot engr dot sgi dot com>
- Subject: Re: GDB on SGI Irix 6.5
- From: Daniel Berlin <dan at cgsoftware dot com>
- Date: 14 Jun 2001 00:19:38 -0400
- Cc: ezannoni at cygnus dot com, Eli Zaretskii <eliz at is dot elta dot co dot il>,jimb at cygnus dot com, gdb at sources dot redhat dot com, cagney at cygnus dot com
- References: <Pine.SUN.3.91.1010612152328.3699B-100000@is><3B266F35.50007@cygnus.com><15142.30117.72465.686304@kwikemart.cygnus.com><200106132033.NAA33197@quasar.engr.sgi.com>
David B Anderson <davea@quasar.engr.sgi.com> writes:
>|
>|> From: Elena Zannoni <ezannoni@cygnus.com>
>|> Date: Tue, 12 Jun 2001 16:03:49 -0400
>|>
>|> Andrew Cagney writes:
>|> > [I'll take the liberty of adding Elena and Jim. Might be useful to pose
>|> > any follow on questions on gdb@]
>|> >
>|> > > On Thu, 17 May 2001, David B Anderson wrote:
>|> > >
>|> > >
>|> > >> 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.
>|> > >
>|> > >
>|>
>|> Are these the only differences? Is anything SGI specific encoded in the
>|> 'version' field of cu_header? Maybe that can be used. Is there somewhere
>|> in the debug info a field that tells that this is SGI's version?
>|
>|I don't see anything in the documents I got from Dave's site. Dave,
>|could you please answer these questions?
>|
>|Thanks for the other advice, I will look that up.
>
> Hopefully already anwered. No, other field in dwarf2.
>
> However, because IRIX is big-endian, and because no
> compilation unit should have an
> initial-length
> field with all zero bits,
>
> A test for a dwarf2 CU (compilation unit)
> initial-length of zero followed 4 bytes
> later by a correct version number for dwarf2
> might suffice (in an elf64 big endian object) folowed by setting
> up the initial_length_size and offset_size
> as above might suffice.
This is correct. The initial length should never be zero. Even for
64 bit dwarf 2.1, it's 0xffffffff followed by 8 bytes of the real
initial length.
>
> Whether this can be done sensibly multi-arch in gdb is not clear to me.
>
> davea@sgi.com
--
"How young can you die of old age?
"-Steven Wright