Re: Unbreaking gdb's catch throw

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Fri, 04 Jan 2013 15:14:27 +0100
On 2013-01-04 14:02, Stefan Farfeleder wrote:
> On Fri, Jan 04, 2013 at 12:54:03PM +0000, David Chisnall wrote:
>> As a work-around, you can put the breakpoint on _Unwind_RaiseException instead.  This will work for any language, not just C++ (e.g. it will notice Objective-C or gcj-compiled Java exceptions).
> Thank you, that works for me.

Alternatively, install the gdb port, which seems to work just fine:

$ /usr/local/bin/gdb ./throw
GNU gdb (GDB) 7.5 [GDB v7.5 for FreeBSD]
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-portbld-freebsd10.0".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /tmp/throw...done.
(gdb) break __cxa_throw
Breakpoint 1 at 0x400604
(gdb) run
Starting program: /tmp/throw

Breakpoint 1, __cxxabiv1::__cxa_throw (obj=0x801c060f0,
     tinfo=0x600c00 <_ZTIi_at__at_CXXABI_1.3>, dest=0x0)
     at /usr/src/gnu/lib/libsupc++/../../../contrib/libstdc++/libsupc++/eh_throw.cc:60
60        __cxa_exception *header = __get_exception_header_from_obj (obj);
Received on Fri Jan 04 2013 - 13:14:38 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:33 UTC