From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7203 invoked by alias); 29 Oct 2006 22:37:56 -0000 Received: (qmail 7195 invoked by uid 22791); 29 Oct 2006 22:37:55 -0000 X-Spam-Check-By: sourceware.org Received: from pivsbh1.ms.com (HELO pivsbh1.ms.com) (199.89.64.101) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sun, 29 Oct 2006 22:37:53 +0000 Received: from pivsbh1.ms.com (localhost [127.0.0.1]) by localhost.ms.com (Postfix) with ESMTP id 9D37618A1; Sun, 29 Oct 2006 17:37:51 -0500 (EST) Received: from ny16im02.ms.com (unknown [144.14.206.243]) by pivsbh1.ms.com (internal Postfix) with ESMTP id 7B4D61E15; Sun, 29 Oct 2006 17:37:51 -0500 (EST) Received: from PIWEXOB01.msad.ms.com (piwexob01 [144.14.3.72]) by ny16im02.ms.com (Sendmail MTA Hub) with ESMTP id k9TMbpq24257; Sun, 29 Oct 2006 17:37:51 -0500 (EST) Received: from PAWEXBH03.msad.ms.com ([205.228.46.226]) by PIWEXOB01.msad.ms.com with Microsoft SMTPSVC(6.0.3790.211); Sun, 29 Oct 2006 17:37:51 -0500 Received: from NYWEXMB81.msad.ms.com ([144.203.227.8]) by PAWEXBH03.msad.ms.com with Microsoft SMTPSVC(6.0.3790.211); Sun, 29 Oct 2006 17:37:50 -0500 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Finding the type of an exception Date: Sun, 29 Oct 2006 22:37:00 -0000 Message-ID: <1F8E762E1B3F814F9630D0D32A1C65F808DA3241@NYWEXMB81.msad.ms.com> In-Reply-To: <20061029222142.GA14050@nevyn.them.org> From: "Kulkarni, Mayuresh \(IT\)" To: "Daniel Jacobowitz" Cc: X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-10/txt/msg00287.txt.bz2 Ahh cool.. That worked!! And there I was trying to do some fancy casting business (trying to simulate the __cxa_call_unexpected(void *) function by looking at its source code. ) Thanks a lot, Mayuresh. | -----Original Message----- | From: Daniel Jacobowitz [mailto:drow@false.org]=20 | Sent: Sunday, October 29, 2006 5:22 PM | To: Kulkarni, Mayuresh (IT) | Cc: gdb@sourceware.org | Subject: Re: Finding the type of an exception |=20 | On Sun, Oct 29, 2006 at 05:15:47PM -0500, Kulkarni,=20 | Mayuresh (IT) wrote: | > Hello, | >=20 | > I am looking at a core generated by a C++ process=20 | because a throw spec=20 | > was violated by a function. | >=20 | > The concerned frame in the stack trace is : | > #5 0xf65c2485 in __cxa_call_unexpected=20 | (exc_obj_in=3D0xb58cbb4) at | > /sw/gcc/src/libstdc++-v3/libsupc++/eh_personality.cc:485 | >=20 | >=20 | > At this point in the process (after std::unexpected()=20 | has been called=20 | > and we end up in the above function), is it still=20 | somehow possible to=20 | > deduce the type of the exception from the exc_obj_in=20 | void * argument? | > Say by trying to interpret the above void * argument as a=20 | > std::exception (from other reasons, I am pretty sure=20 | that this was a=20 | > std::exception) and then doing what typeid does to get=20 | at the type_info ? |=20 | The best place to look for more information about this is=20 | the common | C++ ABI document; it's named for Itanium, but don't let=20 | that throw you | off, it is actually used with only minor variations (such=20 | as the sizes of types) on other platforms. You can learn=20 | more about it here: |=20 | http://www.codesourcery.com/cxx-abi/abi.html | http://www.codesourcery.com/cxx-abi/abi-eh.html |=20 | The object you've got there is a __cxa_exception, if I'm=20 | remembering how this works right. If so then the first=20 | pointer is going to be to a type_info. |=20 | -- | Daniel Jacobowitz | CodeSourcery | -------------------------------------------------------- NOTICE: If received in error, please destroy and notify sender. Sender does= not intend to waive confidentiality or privilege. Use of this email is pro= hibited when received in error.