Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@is.elta.co.il>
To: gdb@sources.redhat.com
Subject: Re: GDB on SGI Irix 6.5
Date: Wed, 13 Jun 2001 01:53:00 -0000	[thread overview]
Message-ID: <Pine.SUN.3.91.1010613115336.16126N@is> (raw)

I'm forwarding this to the list per Andrew's suggestion, to give people 
background when they read the followups.

---------- Forwarded message ----------
Date: Tue, 12 Jun 2001 15:43:00 +0300 (IDT)
From: Eli Zaretskii <eliz@is.elta.co.il>
To: Andrew Cagney <ac131313@cygnus.com>
Cc: David B Anderson <davea@quasar.engr.sgi.com>
Subject: Re: GDB on SGI Irix 6.5


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.

Andrew, I think I need your help to decide how to go about adding support 
for the debugging SGI 64-bit executables, since my understanding of 
multi-arch is still almost nonexistent.

First, it is not clear to me whether the issue of SGI's n32 vs 64 ABI is
at all consistent with the design of GDB's mult-arch facilities.  We are 
talking about two ABIs which are almost identical, including the registers' 
layout, but their debug info is recorded in two different formats.  Is 
this something multi-arch is supposed to handle?

Note that the SGI 64-bit dwarf2 format is not one of the formats for 
which there's a reader available in the GDB distribution.  So basically 
we are talking about an unsupported debug info format, which in principle 
would require a separate *read.c module, along with coffread.c, 
dwarf2read.c, etc.

Am I missing something?

Of course, since the difference in the two dwarf2 formats is not too 
large, I could somehow sneak this in without writing a full-fledged debug 
info reader.  But would this be accepted, and if so, how, if at all, can I 
use the multi-arch infrastructure to control this?

Assuming that multi-arch somehow can be tweaked into doing this, my next 
question is: how do I set things up for GDB to identify the debug info 
format automatically?  That is, if I type "gdb myprog", how can GDB find 
out that `myprog' is a 64-bit executable and automatically switch to the 
64bit ABI architecture?

More generally, what facilities are there in gdbarch to identify the 
architecture of the debuggee automatically?  (My impression is that there 
are no such facilities and that the user should do that manually from 
inside GDB, but perhaps I'm missing something.)

Thanks in advance for any help.


             reply	other threads:[~2001-06-13  1:53 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-13  1:53 Eli Zaretskii [this message]
     [not found] <npae3c16ia.fsf@zwingli.cygnus.com>
2001-06-14  0:52 ` Eli Zaretskii
2001-06-14 10:05   ` Daniel Berlin
     [not found] <Pine.SUN.3.91.1010612152328.3699B-100000@is>
     [not found] ` <3B266F35.50007@cygnus.com>
     [not found]   ` <15142.30117.72465.686304@kwikemart.cygnus.com>
2001-06-13  1:55     ` Eli Zaretskii
2001-06-13 13:35     ` David B Anderson
2001-06-13 21:19       ` Daniel Berlin
     [not found] <200106131650.JAA27856@quasar.engr.sgi.com>
2001-06-13 11:40 ` Eli Zaretskii
2001-06-13 13:05   ` Andrew Cagney
  -- strict thread matches above, loose matches on Subject: below --
2001-05-17 10:15 David B Anderson
2001-05-17 11:40 ` Eli Zaretskii
2001-04-19 18:06 David B Anderson
2001-04-21 11:12 ` Eli Zaretskii
2001-04-21 12:09   ` Paul Hilfinger
2001-04-21 13:09 ` David B Anderson
2001-04-21 13:19   ` Eli Zaretskii
2001-05-17  8:58   ` Eli Zaretskii
2001-05-17  9:15     ` Eli Zaretskii
2001-05-17  9:26       ` Daniel Berlin
2001-05-17  9:28         ` Eli Zaretskii
2001-05-17  9:41           ` Daniel Berlin
2001-05-17 11:33             ` Eli Zaretskii
2001-05-17 11:47               ` Daniel Berlin
2001-04-09  0:08 Eli Zaretskii
2001-04-09  6:53 ` Daniel Berlin
2001-04-17 10:38 ` Andrew Cagney
2001-04-18  9:29   ` Eli Zaretskii
2001-04-19  6:08     ` Eli Zaretskii
2001-04-30 10:01       ` Andrew Cagney
2001-04-30 11:28         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.SUN.3.91.1010613115336.16126N@is \
    --to=eliz@is.elta.co.il \
    --cc=gdb@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox