From owner-freebsd-current@FreeBSD.ORG Fri Jan 4 12:54:12 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 34BB3C90; Fri, 4 Jan 2013 12:54:12 +0000 (UTC) (envelope-from theraven@freebsd.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) by mx1.freebsd.org (Postfix) with ESMTP id E8970F8; Fri, 4 Jan 2013 12:54:10 +0000 (UTC) Received: from [192.168.0.2] (cpc10-cmbg15-2-0-cust123.5-4.cable.virginmedia.com [86.30.246.124]) (authenticated bits=0) by theravensnest.org (8.14.5/8.14.5) with ESMTP id r04Cs8wL021430 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Fri, 4 Jan 2013 12:54:09 GMT (envelope-from theraven@freebsd.org) Subject: Re: Unbreaking gdb's catch throw Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii From: David Chisnall In-Reply-To: <20130104124927.GB1430@mole.fafoe.narf.at> Date: Fri, 4 Jan 2013 12:54:03 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <8FA4D44F-0D32-4374-810F-5630E995F61F@freebsd.org> References: <20130104123424.GA1430@mole.fafoe.narf.at> <20130104124927.GB1430@mole.fafoe.narf.at> To: Stefan Farfeleder X-Mailer: Apple Mail (2.1278) Cc: freebsd-current@freebsd.org 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 12:54:12 -0000 On 4 Jan 2013, at 12:49, Stefan Farfeleder wrote: > 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). =20 >>=20 >=20 > 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. >=20 > To be honest, I don't care exactly whose bug it is, I want it to work = again :D 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). David=