This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

Helping out GDB


As the C++ maintainer for GDB, I run into a lot of fun problems where g++ isn't providing info we need.
And with the new-abi, unless somebody does something, it's only going to get worse.
First and formost, for the old ABI, i have no way to detect what kind of vtable thunks the platform is using, or lack thereof.

Which isn't so bad, we've survived so far by trying it one way, and if doesn't work, trying it the other (which is less than optimal).

Now, with the new-abi coming, another problem is coming up.
I have no way to tell whether something was compiled with the new or old abi.

Can someone please add a symbol,like the gcc2_compiled symbol, that says "this was compiled with the new abi"?
I really can't support all the variants of the old abi+vtable thunks, as well as the new abi, by trying all of them until something works.
That's just a bad hack because gcc isn't telling us what we need to know.


While on the subject of helping GDB with C++ debugging, i've been working on making GDB support catching catches/throws.
It already works for any catch/throw, but once again, since there are a myriad of exception types support by gcc, with no way to tell them apart, I can't do anything more than this simple feature, because the names of the symbols i need to lookup, and where they are in relation to the actual throw/catch that was done, always seems to change.

It would be nice if GCC, like a few other compilers, provided a callback so that I could say "when you get an exception in the program, call this routine", and it would call the callback with a few key parameters that i could use to tell what was thrown/caught and where.
As long as exceptions were thread-safe, so would be doing a callback.
Any other way of providing GDB info about catches/throws is also acceptable, though it would be nice to be able to catch catches/throws of specific exception types, and it seems hard to do this without a callback.
A callback would also remove the problem of their being so many different implementations of exception handling, since GDB would no longer have to care about how it was implemented.



Thanks,
Dan


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