Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@gnat.com>
To: Jason R Thorpe <thorpej@wasabisystems.com>,
	gdb-patches@sources.redhat.com
Subject: Re: HPPA multiarching plan
Date: Mon, 25 Nov 2002 17:24:00 -0000	[thread overview]
Message-ID: <20021126012454.GI1259@gnat.com> (raw)
In-Reply-To: <20021126010438.GD21009@yeah-baby.shagadelic.org>

My many thanks to Daniel and Jason for their very prompt and helpful
answers!

> You should not need the processor name in the OSABI ("embedded ABIs"
> are kind of a special case, which is why you see the processor name
> in those).  You also should not need the "64" .. I would guess that
> would be differentiated based on the object file format (SOM [32] vs.
> Elf32 vs. Elf64 -- assuming hppa64 binaries use the Elf64 format; I'm
> not sure that they do, please educate me :-).

I see what you mean. (and yes, hppa64 uses Elf64).

> So, I think you only need GDB_OSABI_HPUX.

Ok.

> So, I would say that you could use the following algorithm for
> HPPA:
> 
> 	* Lookup osabi.
> 	* If osabi is unknown:
> 	  * If file is SOM or ELF, assume GDB_OSABI_HPUX.

That's absolutely brillant. I'll learn a bit more about this
generic sniffer, it looks really cool :).

> You should also add an HPUX case to osabi.c:generic_elf_osabi_sniffer(),
> since there is an ELFOSABI constant for HPUX.

Wildo, thanks for pointing this.

One little thing that still bothers (because I don't know yet how to
properly handle this) is: some of the gdbarch methods will be different
depending whether it is a pa64 or a pa32... Having 2 osabis was
convenient that way. I see we have NETBSD_AOUT and NETBSD_ELF, perhaps
it would still make sense to define 2 new osabis vis:
  - _HPUX_ELF
  - _HPUX_SOM          

Otherwise, what I could do is maintain a local variable in the
gdbarch_init routine, and set it depending on the object format...

-- 
Joel


  reply	other threads:[~2002-11-26  1:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-25 16:48 Joel Brobecker
2002-11-25 16:58 ` Daniel Jacobowitz
2002-11-25 17:04 ` Jason R Thorpe
2002-11-25 17:24   ` Joel Brobecker [this message]
2002-11-25 17:47     ` Jason R Thorpe
2002-11-26  7:26   ` Andrew Cagney
2002-11-26  7:56     ` Jason R Thorpe

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=20021126012454.GI1259@gnat.com \
    --to=brobecker@gnat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=thorpej@wasabisystems.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