Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kai Tietz <ktietz70@googlemail.com>
To: Pedro Alves <pedro@codesourcery.com>
Cc: Joel Brobecker <brobecker@adacore.com>,
	gdb-patches@sourceware.org, 	Tom Tromey <tromey@redhat.com>
Subject: Re: [RFA/commit/Win64] Remove new extra leading underscore in symbol 	name
Date: Thu, 24 Jun 2010 20:12:00 -0000	[thread overview]
Message-ID: <AANLkTikZp3m59Ch0T7uxSEcfE-9iDXPxsPTBnMjBxS_3@mail.gmail.com> (raw)
In-Reply-To: <201006242025.25966.pedro@codesourcery.com>

2010/6/24 Pedro Alves <pedro@codesourcery.com>:
> On Thursday 24 June 2010 20:00:21, Joel Brobecker wrote:
>> No, you're probably right. I was slowly realizing this while I was
>> updating the comment I wrote in the previous patch. The problem is:
>> what's the right way to detect how the binary was built?
>
> I don't think there's a "right way".  At least, I can't think of
> one.  Maybe there's some heuristic way, like looking for some well
> known symbol in the implementation namespace for two or
> three underscores, say.  Always likely to fail, for several reasons,
> one of them that you still misfix asm defined underscored symbols.
> And you'd probably want to consider handling the reverse -- missing
> underscores, in gdb/bfd's perspective.  Very fragile, if you ask me.

Right, to ask bfd for toolchain's target default underscoring is for
sure not bad, but doesn't address the issue complete. Probing of
symbols could be a way, but it is indeed fragile.

>> Right now,
>> the bfd change is a major incompatibility nightmare since minimal
>> symbols and symbols no longer have the same name.
>
> It was an ABI change.  Incompatibilities are sort of expected by
> design, when all the tools don't agree on the ABI.  :-)

:)

>> GDB needs to be able to support both (IMO).
>
> Does the --enable-leading-mingw64-underscores switch affect
> bfd as well, and fix this?  While supporting both sounds ideal,
> in practice, I'd think it to be enough for vendors to support
> gdb builds that match the ABI of their compiler.  Or two builds,
> if they care, until the old ABI is phased out.

Yes, by --enable-leading-mingw64-underscores just the default in bfd
is changed. So it could be a work-a-round for supporting binaries
having non-ABI name-decoration.

> --
> Pedro Alves
>

Kai

-- 
|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination


  reply	other threads:[~2010-06-24 20:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-17 22:25 Joel Brobecker
2010-06-18 17:40 ` Tom Tromey
2010-06-24 18:23   ` Joel Brobecker
2010-06-24 18:31     ` Tom Tromey
2010-06-24 18:42     ` Pedro Alves
2010-06-24 19:00       ` Joel Brobecker
2010-06-24 19:25         ` Pedro Alves
2010-06-24 20:12           ` Kai Tietz [this message]
2010-06-24 20:32             ` Joel Brobecker
2010-06-24 20:41               ` Kai Tietz
2010-06-25  8:33 ` Pierre Muller

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=AANLkTikZp3m59Ch0T7uxSEcfE-9iDXPxsPTBnMjBxS_3@mail.gmail.com \
    --to=ktietz70@googlemail.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pedro@codesourcery.com \
    --cc=tromey@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