uw_install_context() and GDB
Phil Muldoon
pmuldoon@redhat.com
Thu Aug 14 17:59:00 GMT 2008
Daniel Jacobowitz wrote:
> On Thu, Aug 14, 2008 at 05:46:32PM +0100, Phil Muldoon wrote:
>
>> The first was modifying the "next" command to place an
>> implementation-internal breakpoint in __cxa_begin_catch, and comparing
>> frames. (Is the frame that "next" was performed on above the
>> current-frame? If so stop). But this method would skip any user-written
>> destructors in the _UA_CLEANUP_PHASE. If any user-written destructors
>> exist in the frame "next" was run on, or any frame inbetween that and the
>> exception-handler, then the inferior should be stopped there - at the
>> first one. This would be the proper behaviour for "next". Placing a
>> breakpoint in __cxa_begin_catch would skip those. So I do not think this
>> method is suitable.
>>
>
> I think you have to justify that assertion ("this would be the proper
> behavior").
Quite right. That sentence really should have been prefixed by "In my
opinion" ;)
> Why would it be? They're like signal handlers or
> function calls; breakpoints in them would stop the program, but I
> don't see a reason "next" should see them
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.
Regards
Phil
More information about the Archer
mailing list