[PATCH] gdb/python: add a 'connection_num' attribute to Inferior objects
Eli Zaretskii
eliz@gnu.org
Mon Apr 12 13:12:19 GMT 2021
> Date: Mon, 12 Apr 2021 14:44:01 +0200
> From: Tankut Baris Aktemur via Gdb-patches <gdb-patches@sourceware.org>
>
> Define a 'connection_num' attribute for Inferior objects. The
> read-only attribute is the ID of the process stratum target of an
> inferior, as printed by "info inferiors".
>
> gdb/ChangeLog:
> 2021-04-12 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
>
> * python/py-inferior.c (infpy_get_connection_num): New function.
> (inferior_object_getset): Add a new element for 'connection_num'.
>
> gdb/doc/ChangeLog:
> 2021-04-12 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
>
> * python.texi (Inferiors In Python): Mention the 'connection_num'
> attribute.
>
> gdb/testsuite/ChangeLog:
> 2021-04-12 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
>
> * gdb.python/py-inferior.exp: Add test cases for 'connection_num'.
Thanks.
> --- a/gdb/doc/python.texi
> +++ b/gdb/doc/python.texi
> @@ -2989,6 +2989,10 @@ A @code{gdb.Inferior} object has the following attributes:
> ID of inferior, as assigned by GDB.
> @end defvar
>
> +@defvar Inferior.connection_num
> +ID of inferior's connection (i.e. process target), as assigned by GDB.
> +@end defvar
Please insert @: after "i.e.", so that the period will not be taken as
an end of a sentence.
Also, we use @value{GDBN} instead of a literal "GDB".
The documentation part is okay with these nits fixed. (Does this
warrant a NEWS entry as well?)
More information about the Gdb-patches
mailing list