This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v4] Implement $_exitsignal
- From: Pedro Alves <palves at redhat dot com>
- To: Sergio Durigan Junior <sergiodj at redhat dot com>
- Cc: GDB Patches <gdb-patches at sourceware dot org>, Doug Evans <dje at google dot com>
- Date: Fri, 04 Oct 2013 10:42:13 +0100
- Subject: Re: [PATCH v4] Implement $_exitsignal
- Authentication-results: sourceware.org; auth=none
- References: <m3six3nxr6 dot fsf at redhat dot com> <524B1648 dot 8090805 at redhat dot com> <m361te29cs dot fsf at redhat dot com> <524D4F10 dot 5040200 at redhat dot com> <m3ob76yuf9 dot fsf at redhat dot com>
On 10/03/2013 09:24 PM, Sergio Durigan Junior wrote:
> gdb/
> 2013-10-02 Sergio Durigan Junior <sergiodj@redhat.com>
>
> * NEWS: Mention new convenience variable $_exitsignal.
> * corelow.c (core_open): Reset exit convenience variables. Set
Double space after period.
> $_exitsignal to the uncaught signal which generated the corefile.
> * infrun.c (handle_inferior_event): Reset exit convenience
> variables. Set $_exitsignal for TARGET_WAITKIND_SIGNALLED.
> (clear_exit_convenience_vars): New function.
> * utils.h (clear_exit_convenience_vars): New prototype.
s/utils.h/inferior.h/.
> index 922a0f2..fa8a5d3 100644
> --- a/gdb/inferior.h
> +++ b/gdb/inferior.h
> @@ -639,4 +639,10 @@ extern void signal_catch_update (const unsigned int *);
>
> enum gdb_signal gdb_signal_from_command (int num);
>
> +/* Clear the convenience variables associated with the exit of the
> + inferior. Currently, those variables are $_exitcode and
> + $_exitsignal. */
> +
> +extern void clear_exit_convenience_vars (void);
> +
Close, but not here. Look up in the file, you'll find:
> /* From infrun.c */
Declare the function in that section of the file.
(I'd approve patches that create infrun.h, etc.)
> #endif /* !defined (INFERIOR_H) */
> @@ -7061,6 +7091,15 @@ save_inferior_ptid (void)
> *saved_ptid_ptr = inferior_ptid;
> return make_cleanup (restore_inferior_ptid, saved_ptid_ptr);
> }
> +
> +/* See comment at utils.h. */
s/at/in/, I believe. Or just "See utils.h".
> +/* See comment at utils.h. */
But most importantly, s/utils.h/inferior.h/.
Okay with these changes.
Thanks,
--
Pedro Alves