[PATCH v6 3/3] gdb/gcore: interrupt all threads to generate core in non-stop targets

Eli Zaretskii eliz@gnu.org
Wed Mar 22 16:44:53 GMT 2023


> CC: <lsix@lancelotsix.com>, Lancelot SIX <lancelot.six@amd.com>
> Date: Wed, 22 Mar 2023 16:35:04 +0000
> From: Lancelot SIX via Gdb-patches <gdb-patches@sourceware.org>
> 
> diff --git a/gdb/NEWS b/gdb/NEWS
> index cc262f1f8a6..65ac722bd2e 100644
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -91,6 +91,14 @@ show always-read-ctf
>     $2 = 1
>     (gdb) break func if $_shell("some command") == 0
>  
> +* Changed commands
> +
> +gcore
> +generate-core-file
> +  For non-stop targets, GDB ensures that all threads are stopped before
> +  generating a core dump.  At the end of the command, threads are restored
> +  to their previous state.
> +
>  * MI changes

This part is OK.

> --- a/gdb/doc/gdb.texinfo
> +++ b/gdb/doc/gdb.texinfo
> @@ -13763,6 +13763,11 @@ Produce a core dump of the inferior process.  The optional argument
>  specified, the file name defaults to @file{core.@var{pid}}, where
>  @var{pid} is the inferior process ID.
>  
> +If the current inferior's target is non-stop, @value{GDBN} ensures that

Please add a cross-reference after "non-stop" to where we describe
that mode.

Thanks.

Reviewed-By: Eli Zaretskii <eliz@gnu.org>


More information about the Gdb-patches mailing list