From owner-freebsd-current@FreeBSD.ORG Fri Jan 4 14:14:38 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1F7AEE60; Fri, 4 Jan 2013 14:14:38 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id CB9D23FB; Fri, 4 Jan 2013 14:14:37 +0000 (UTC) Received: from [192.168.0.6] (spaceball.home.andric.com [192.168.0.6]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 5CCBF5C5A; Fri, 4 Jan 2013 15:14:26 +0100 (CET) Message-ID: <50E6E3C3.8040801@FreeBSD.org> Date: Fri, 04 Jan 2013 15:14:27 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20121128 Thunderbird/18.0 MIME-Version: 1.0 To: Stefan Farfeleder Subject: Re: Unbreaking gdb's catch throw References: <20130104123424.GA1430@mole.fafoe.narf.at> <20130104124927.GB1430@mole.fafoe.narf.at> <8FA4D44F-0D32-4374-810F-5630E995F61F@freebsd.org> <20130104130217.GC1430@mole.fafoe.narf.at> In-Reply-To: <20130104130217.GC1430@mole.fafoe.narf.at> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org, David Chisnall X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jan 2013 14:14:38 -0000 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 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: ... 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);