[RFC] Unexpected automatic language switch - get_frame_language()

Daniel Jacobowitz drow@mvista.com
Wed Dec 10 17:47:00 GMT 2003


Hi Joel,

I've got no problems with your final patch, which is why I didn't
respond until now, but I'd like to go off on a little tangent...

On Fri, Dec 05, 2003 at 02:48:07PM -0800, Joel Brobecker wrote:
> Some additional information about "break exception". We have slightly
> modified the handling of the "break" command when in ada mode to special
> case "break exception". This places a breakpoint on a known GNAT runtime
> routine that's called upon exception raise. That's more or less how
> exception breakpoints are implemented for Ada.

This is really unfortunate.  I suppose you've released products that do
this?  Is there any way you could switch to something like "catch
throw" / "catch catch" which GDB implements for C++ for the same
functionality - though not very well yet.  Adding catch raise as an
alias for catch throw if that's more Ada-appropriate would be easy.

> For the user's convenience, when the breakpoint is hit, we automatically
> go up the call stack until we find a "user frame" (meaning a frame which
> has debug info and is not inside the GNAT runtime), and select that
> frame. So the user usually sees the location where the exception was
> raised, instead of the runtime machinery that triggers and handles the
> exception raise.

Does the real frame show up in backtraces?

What you're describing is what I tried to do for C++, but I couldn't
get it to work right.  I'd love to unify this code.


-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



More information about the Gdb-patches mailing list