This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
Re: questions about some branches
Dmitry Malichenko wrote:
> Could you please help me with my questions about branches:
>
> 1) archer-pmuldoon-exception-rewind-master
> Purpose: Recover from fatal signals delivered via C++ exceptions in
> an inferior function call
> Question: What signals are meant here? Could you please describe
an example?
>
This patch addresses undesirable behaviour in an inferior function call
when a C++ exception is raised in that call. As GDB constructs a single
"dummy-frame" for the inferior function call, it can prevent the
unwinder from finding an out-of-frame C++ exception handler if an
exception is raised in that call. The basic result then is that the C++
default exception handler is called -- which calls abort(). This signal
is delivered to the inferior and terminated. As an out-of-frame handler
can legitimately handle a C++ exception, and as the dummy-frame
environment prevents the unwinder from locating any out-of-frame
handlers, this behaviour is wrong. This patch prevents that by detecting
calls to the default handler in an inferior function call, and if so
detected pops the stack and restores context of the inferior to before
the call (preventing termination).
Example:
void foo ()
{
throw 1;
}
void bar ()
{
try
foo ();
catch (...)
cout << "oops";
}
In GDB, if you were to do this:
print foo()
The inferior would be terminated, as the unwinder would not be able to
find an exception handler for the throw 1. The result is the inferior is
terminated.
BTW I submitted this patch upstream just last week
> There are also some general questions:
> - Had somebody merged the branches mentioned above together?
I believe Jan has merged several for the Fedora 11 release. But he can
better answer there.
> - What is the difference between Master and Archer branch?
I think Archer branch is defunct, and master tracks GDB upstream (when
someone updates it from upstream)
> - Is it supposed to merge Archer with GDB (main branch) in future?
The intent is to get all branches merged upstream in the future. Several
are in process now, and as more mature they will be too.
Hope this helps!
Phil