From: Kevin Buettner <kevinb@redhat.com>
To: Andrew Cagney <ac131313@redhat.com>, gdb-patches@sources.redhat.com
Subject: Re: [patch/rfc,rfa:ppc64] Add osabi wildcard support
Date: Tue, 28 Oct 2003 21:59:00 -0000 [thread overview]
Message-ID: <1031028215919.ZM3764@localhost.localdomain> (raw)
In-Reply-To: Andrew Cagney <ac131313@redhat.com> "[patch/rfc,rfa:ppc64] Add osabi wildcard support" (Oct 23, 7:25pm)
On Oct 23, 7:25pm, Andrew Cagney wrote:
> The attached patch adds the ability to specify a wildcard machine when
> registering an OSABI / arch / machine. It then updates PPC64 GNU/Linux
> to specify that wild card (-1) instead of zero as the default machine.
>
> Looking at the PPC64 GNU/Linux code:
>
> gdbarch_register_osabi (bfd_arch_powerpc, 0, GDB_OSABI_LINUX,
> ppc_linux_init_abi);
>
> I believe that the call is attempting to register ppc_linux_init_abi as
> the OSABI handler for all arch/machine conbinations. The problem is
> that machine "0" gets turned into bfd_mach_ppc or bfd_mach_ppc64
> dependant on how GDB is built, and they are both incompatible with each
> other and incompatible . And that in turn restricts the support to just
> one half of the ISA family making it impossible for GDB to debug both 32
> and 64 bit :-(
>
> I know of two ways to fix this. First is the attached patch which
> modifies osabi.[hc] so that a wildcard machine (-1) can be specified vis:
>
> gdbarch_register_osabi (bfd_arch_powerpc, -1, GDB_OSABI_LINUX,
> ppc_linux_init_abi);
>
> and the second is to explicitly register both of these architecture
> variants vis:
>
> gdbarch_register_osabi (bfd_arch_powerpc, bfd_mach_ppc, ...
> gdbarch_register_osabi (bfd_arch_powerpc, bfd_mach_ppc64, ...
>
> (possibly also splitting ppc_linux_init_abi into ppc_linux_init_abi_32
> and ppc_linux_init_abi_32).
>
> There are pros and cons to both.
>
> The former will always match, making the code somewhat future proof, the
> later is far simplier.
>
> preferences?
At the moment, I prefer the explicit registration of architecture
variants. I'd prefer to wait on adding the wildcard mechanism until a
more compelling need for it is demonstrated.
Kevin
next prev parent reply other threads:[~2003-10-28 21:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-23 23:25 Andrew Cagney
2003-10-23 23:41 ` Daniel Jacobowitz
2003-10-24 0:38 ` Andrew Cagney
2003-10-24 0:52 ` Daniel Jacobowitz
2003-10-24 14:47 ` Andrew Cagney
2003-10-24 14:31 ` Andrew Cagney
2003-10-24 14:55 ` Daniel Jacobowitz
2003-10-28 21:59 ` Kevin Buettner [this message]
2003-10-28 23:56 ` Andrew Cagney
2003-10-29 3:33 ` Kevin Buettner
2003-10-29 19:30 ` Andrew Cagney
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=1031028215919.ZM3764@localhost.localdomain \
--to=kevinb@redhat.com \
--cc=ac131313@redhat.com \
--cc=gdb-patches@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