catch catch before program starts
Aleksandar Ristovski
aristovski@qnx.com
Tue Apr 29 18:56:00 GMT 2008
Hello,
When we first load symbols, we can not set "catch catch" or "catch throw". The error message will say "Function __cxa_... not defined".
However, we can set a breakpoint in .plt section. The attached patch illustrates this (it is not finished as there will be some error messages even though the catch will be set).
The idea is to try __cxa_begin_catch and then, failing that, to try with __cxa_begin_catch@plt.
Now:
(gdb) catch catch
Function "__cxa_begin_catch" not defined.
(gdb)
After patch:
(gdb) file /tmp/sig/main
Reading symbols from /tmp/sig/main...done.
(gdb) catch catch
Oops...Function "__cxa_begin_catch" not defined.
Catchpoint 1 (catch)
(gdb) catch throw
Oops...Function "__cxa_throw" not defined.
Catchpoint 2 (throw)
(Ignore the "Oops" part).
Comments?
Aleksandar Ristovski
QNX Software Systems
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: breakpoint.c.catchatplt.diff
URL: <http://sourceware.org/pipermail/gdb/attachments/20080429/7bade3a0/attachment.ksh>
More information about the Gdb
mailing list