Date: Fri, 4 Jan 2013 13:49:27 +0100 From: Stefan Farfeleder <stefanf@FreeBSD.org> To: David Chisnall <theraven@FreeBSD.org> Cc: freebsd-current@FreeBSD.org Subject: Re: Unbreaking gdb's catch throw Message-ID: <20130104124927.GB1430@mole.fafoe.narf.at> In-Reply-To: <FC255095-1EFB-4713-887E-E79C53C9F193@FreeBSD.org> References: <20130104123424.GA1430@mole.fafoe.narf.at> <FC255095-1EFB-4713-887E-E79C53C9F193@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jan 04, 2013 at 12:38:44PM +0000, David Chisnall wrote: > Is this on 9.1? In -CURRENT and 9.1, libstdc++ is a filter library, and libsupc++ or or libcxxrt are the filtee. This means that the __cxa_throw symbol appears to be in libstdc++ (for symbol versioning purposes), but is actually in the ABI library. If you tell gdb to put the breakpoint on __cxa_throw itself, then it should tell you that there are multiple definitions and ask which one you want (if it doesn't, it's a gdb bug). > This is on 10.0-CURRENT r244738 amd64. The commands 'b __cxa_throw' and 'catch throw' seemd to be identical, and gdb does not ask about multiple versions of __cxa_throw. To be honest, I don't care exactly whose bug it is, I want it to work again :D $ cat throw.cc int main(void) { throw 1; } $ c++ -g throw.cc $ gdb a.out GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"... (gdb) b main Breakpoint 1 at 0x4007f9: file throw.cc, line 3. (gdb) r Starting program: /usr/home/stefan/scratch/a.out Breakpoint 1, main () at throw.cc:3 3 throw 1; (gdb) b __cxa_throw Breakpoint 2 at 0x800898d34 (gdb) c Continuing. terminate called after throwing an instance of 'int' Program received signal SIGABRT, Aborted. 0x0000000800e52fca in kill () from /lib/libc.so.7 Stefan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130104124927.GB1430>