Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 04 Jan 2013 15:14:27 +0100
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Stefan Farfeleder <stefanf@FreeBSD.org>
Cc:        freebsd-current@freebsd.org, David Chisnall <theraven@freebsd.org>
Subject:   Re: Unbreaking gdb's catch throw
Message-ID:  <50E6E3C3.8040801@FreeBSD.org>
In-Reply-To: <20130104130217.GC1430@mole.fafoe.narf.at>
References:  <20130104123424.GA1430@mole.fafoe.narf.at> <FC255095-1EFB-4713-887E-E79C53C9F193@FreeBSD.org> <20130104124927.GB1430@mole.fafoe.narf.at> <8FA4D44F-0D32-4374-810F-5630E995F61F@freebsd.org> <20130104130217.GC1430@mole.fafoe.narf.at>

next in thread | previous in thread | raw e-mail | index | archive | help
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@@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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50E6E3C3.8040801>