Helping out GDB
Jeffrey A Law
law@cygnus.com
Wed Jul 12 23:02:00 GMT 2000
In message < m2d7kj6qu9.fsf@localhost.localdomain >you write:
> I think gcc2_compiled is a hack as is.
Agreed.
> Can't you just put the compile flags or feature flags in a string and inclu
> de that, so i can see if it says "GCC 3.0, new-abi, DWARF2 based exceptions
> ", or some such?
Well, I'd be more interested in designing some way to pass the information
you need in a structured way rather than as a bunch of hacks. For example
we have ways to pass around ABI/ISA information in most object formats
now, that can be used to include "gcc/g++ ABI 3.0" instead of just
"mips o32, mips n32, etc etc"
I would think we could figure out the EH model by looking at what
sections exist in the executable -- don't dwarf2 EH tables show up in
their own special section?
> Nothing in GDB actually depends on gcc2_compiled being there.
Right. And I think that's the way it should stay :-)
> People before
> i became C++ maintainer gave up trying to detect the variations, and as a
> result, gcc2_compiled is never actually used right now (save one place, i b
> elieve, but it's not even exported from the file it's set in anymore).
Right. Instead of looking for a magic symbol, we need a structured way to
say "this program has the following features". ie, describe the things
the debugger cares about rather than "I happened to compile this with compiler
xyz and hope the debugger figures out what it means".
It's not unlike how we deal with host specific issues -- we write autoconf
tests to look for specific features of the host rather than trying to
guess that hpux10.20 has a weird mmap, but hpux11.00 does it right, or
whatever.
Jeff
More information about the Gcc
mailing list