This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
Re: uw_install_context() and GDB
- From: Phil Muldoon <pmuldoon at redhat dot com>
- To: Ian Lance Taylor <iant at google dot com>
- Cc: Daniel Jacobowitz <drow at false dot org>, Project Archer <archer at sourceware dot org>, jason at redhat dot com
- Date: Fri, 15 Aug 2008 06:02:16 -0400 (EDT)
- Subject: Re: uw_install_context() and GDB
Ian Lance Taylor wrote:
> Phil Muldoon <pmuldoon@redhat.com> writes:
>
>
>> I take your point well. But if these are user-written destructors, and
>> they are being executed on the journey to the exception handler,
>> shouldn't "next" return control here? There is a little bit of
>> irony. In a conversation I was having recently, I was making a case of
>> "next" over a throw always returning control at the corresponding
>> "catch", and ignoring the destructors. I changed my mind when it was
>> suggested that significant and important work relevant to the code a
>> user has written happen in destructors. But quite right, I glossed
>> over this, and should make room for conversation on it.
>>
>
> I agree that "next" over a function call that throws an exception past
> the current stack frame should ideally stop in a user written
> destructor. It shouldn't stop for destructors in functions below the
> current stack frame.
Thanks for the control illustration. I definitely agree that control
should not be return in a destructor (if one exists) in an inner frame
from the throw.
Regards
Phil