From: Phil Muldoon <pmuldoon@redhat.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] Do not allow unwinder to terminate inferior in an inferior function call if a C++ exception handler cannot be found.
Date: Mon, 27 Apr 2009 08:58:00 -0000 [thread overview]
Message-ID: <49F573A0.4080500@redhat.com> (raw)
In-Reply-To: <83vdouf8o2.fsf@gnu.org>
Eli Zaretskii wrote:
>> + add_setshow_boolean_cmd ("unwind-on-terminating-exception", no_class,
>> + &unwind_on_terminating_exception_p, _("\
>> +Set unwinding of stack if a std::terminate() call originates from\n\
>> +the default C++ exception handler."), _("\
>> +Show unwinding of stack if a std::terminate() call originates from\n\
>> +the default C++ exception handler."), _("\
>>
>
> This is not good: the first sentence of a doc string should not take
> more than one screen line, because various help commands, such as
> `apropos', display only the first line. How about
>
> Set unwinding of stack if std::terminate is called while in call dummy.
>
> ?
>
That's fine with me. I did not know that about apropos, thanks for the
tip. I'll add it to my patch list.
>> +The unwind on terminating exception flag lets the user determine\n\
>> +what gdb should do if a std::terminate() call is made from the\n\
>> +default exception handler.\n\
>> +The default is to unwind the frame."),
>>
> This doesn't tell what happens if it's set to OFF.
>
>
I actually thought about this, but the off behaviour is just how GDB
"used to be". Something like: "If the flag is set to be 'off', GDB
will allow the inferior to be terminated by the default exception handler."?
>> +Similarly, with a C++ program it is possible for the function you
>>
>
> Please use C@t{++} (here and elsewhere), it looks better in the
> printed manual.
>
>
Thanks, noted and corrected.
>> +call via the @code{print} or @code{call} command to generate an
>> +exception that is not handled due to the constraints of the dummy
>> +frame.
>>
>
> I think ``due to the constraints of the dummy frame'' needs an
> explanation. I'm quite sure many C++ programmers will not immediately
> grasp the nature of the problem.
>
I'll add a brief narrative explaining why the unwinder can only see the
dummy frame, and incorrectly infer that there are no more frames to
check for an exception handler.
>
>> +Set unwinding of the stack if a C++ exception is raised but unhandled
>>
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> either
> exception is raised, but left unhandled
>
>
I'll use that one, thanks.
>> If set to off, @value{GDBN} the exception is delivered to
>> +the default C++ exception handler.
>>
>
> This means the debuggee will be terminated, right? If so, we should
> mention that explicitly.
>
>
Noted, and changed.
> Other than that, the patch for the manual is approved.
>
Thanks for the swift review!
Regards
Phil Muldoon
next prev parent reply other threads:[~2009-04-27 8:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-24 8:32 Phil Muldoon
2009-04-24 14:06 ` Eli Zaretskii
2009-04-27 8:58 ` Phil Muldoon [this message]
2009-04-27 18:29 ` Eli Zaretskii
2009-05-08 15:23 ` Phil Muldoon
2009-05-12 10:37 ` Joel Brobecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49F573A0.4080500@redhat.com \
--to=pmuldoon@redhat.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox