This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/11328] New: std::terminate isn't caught if one manually calls an inferior function that calls dlopen
- From: "pedro at codesourcery dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: 26 Feb 2010 01:38:20 -0000
- Subject: [Bug gdb/11328] New: std::terminate isn't caught if one manually calls an inferior function that calls dlopen
- Reply-to: sourceware-bugzilla at sourceware dot org
Below are a couple of contrived examples to show the problem.
Example 1, with dlopen call:
1:
void function (void)
{
dlopen (SHLIB_NAME, RTLD_LAZY);
std::terminate ();
}
int main()
{
}
(gdb) start
(gdb) call function ()
terminate called without an active exception
Program received signal SIGABRT, Aborted.
0x00007ffff70f44b5 in raise () from /lib/libc.so.6
The program being debugged was signaled while in a function called from GDB.
GDB remains in the frame where the signal was received.
To change this behavior use "set unwindonsignal on".
Evaluation of the expression containing the function
(function()) will be abandoned.
When the function is done executing, GDB will silently stop.
(gdb)
But if one removes the call to dlopen, the problem is gone. Example 2
below shows that.
2:
void function (void)
{
std::terminate ();
}
int main()
{
}
(gdb) start
(gdb) call function ()
Breakpoint 0, 0x00007ffff7992110 in std::terminate() () from /usr/lib/libstdc++.so.6
The program being debugged entered a std::terminate call, most likely
caused by an unhandled C++ exception. GDB blocked this call in order
to prevent the program from being terminated, and has restored the
context to its original state before the call.
To change this behaviour use "set unwind-on-terminating-exception off".
Evaluation of the expression containing the function (function())
will be abandoned.
(gdb)
--
Summary: std::terminate isn't caught if one manually calls an
inferior function that calls dlopen
Product: gdb
Version: 7.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gdb
AssignedTo: unassigned at sourceware dot org
ReportedBy: pedro at codesourcery dot com
CC: gdb-prs at sourceware dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=11328
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.