This is the mail archive of the
mailing list for the Archer project.
Re: C++ exceptions catching through GDB-patched .eh_frame
On Wed, 17 Dec 2008 02:20:07 +0100, Tom Tromey wrote:
> Could we modify the personality functions to check a global, which we
> would then set before "next" (and clear after it)? This global could
> refer to the frame we are "next"ing in, so the exception machinery
> could ignore uninteresting exceptions. For interesting ones, it could
> call a function where we could put a breakpoint. That would avoid the
> context switch per exception.
> It wouldn't work with older versions of the compiler. I'm not sure
> how much that matters.
Just that I fully agree it is a better choice - to patch __gxx_personality_v0.
A hook only for debugging - conditionalized something like _dl_debug_state().
> It would have some performance cost on all thrown exceptions.
Whole unwinding and __gxx_personality_v0() is already not a trivial task.