This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]