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




"Eli Zaretskii" <eliz@is.elta.co.il> writes:
|> >  - What should I do about the different ABIs?  At least 3 come to
|> >    mind: O32, N32, and N64.  They have subtly different layouts of
|> >    registers, so if I need to set things up for more than a single
|> >    ABI, I'll need to know what's the current say-so about how this
|> >    should be done (e.g., does gdbarch has some functionality for
|> >    dynamically computing the registers array?).
|> 
|> The register layouts for n32 and 64 are the same.
|> Pointer and int are different sizes, but the registers
|> themselves are the same and designated the same.
|> 
|> The register set for o32 is different, and should be the same as for
|> irix5.
|
|Is it correct to say that, in general, n32 and 64 ABIs are
|inappropriate for Irix 5?  In other words, does it make sense to
|support n32 and 64 ABIs only for Irix 6.x?

Exactly correct 
	IRIX5 had two ABIs
	o32 elf (not called o32 back then, but it is called that now) 
	coff    (xcoff whatever the right name is)

|> Recall that o32 uses the mdebug/third-eye format for debug info
|> while n32/64 uses dwarf2 exlusively for debug info
|
|Is it really dwarf2 or elf?  I don't have access to the SGI box where
|I'm writing this, but I seem to remember that elf was used by GDB to
|read the debug info.


Sorry, I was using sloppy wording.

We can lump all of the IRIX6 variants under one umbrella as
they are not different in any important sense from IRIX6.5
(or IRIX 6.5.x) for gdb's purposes.

o32, n32, and -64 for IRIX6.5 are all elf object format.
o32 n32 are Elf32. 
-64 is Elf64.

For debug information, o32 uses third-eye/mdebug
(.mdebug is the Elf section name MIPS/SGI assigned. Third-eye is
the company that invented the debug information format MIPS
adopted in the mid-80's for COFF and that MIPS/SGI 
kept (for o32) in the transition to Elf).

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 from the registers.

Repeating what I said earlier, from a *register* point of view,
n32 and -64 are the same. The same register names and
conventions and the same argument passing.
The distinction is that n32 is ILP32 and -64 is LP64:
there is no  difference in the hardware registers (names
or lengths or anything) between them. 
(ILP32: int, long, and pointer all 32 bits)
(LP64:  int 32 bits; long and pointer 64 bits)
(Both support long long and it is always 64 bits)

|> I am not much help in determining the 'right way to do things' for
|> gdb, but if there is any way I can help with building or
|> testing or anything on IRIX6.5, let me know.
|
|Thanks, I will probably ask you to build the current CVS version with
|the candidate patches, to make sure I didn't miss something.

Ok. Glad to help.
Just send me the patches when you are ready.
I'm going to be in meetings most of next week so
I may be a bit tardy in responding then.

Hope this makes sense (rather than adding confusion).
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]