This is the mail archive of the gdb-patches@sourceware.org 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]
Other format: [Raw text]

Re: [RFA/commit/Win64] Remove new extra leading underscore in symbol name


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 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.

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]