diff options
author | Andrew Burgess <aburgess@redhat.com> | 2024-01-09 17:29:24 +0000 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2024-01-12 09:22:25 +0000 |
commit | 76118e1675f5eaf3fc44524ec435981705572629 (patch) | |
tree | 4f4351eece10850ac947757b538a795a72e43491 /gdb/doc | |
parent | 322ffd247e4e95a0d5a1b11ad1ef91f3378e6174 (diff) | |
download | fsf-binutils-gdb-76118e1675f5eaf3fc44524ec435981705572629.zip fsf-binutils-gdb-76118e1675f5eaf3fc44524ec435981705572629.tar.gz fsf-binutils-gdb-76118e1675f5eaf3fc44524ec435981705572629.tar.bz2 |
gdb/python: New InferiorThread.ptid_string attribute
This commit adds a new InferiorThread.ptid_string attribute. This
read-only attribute contains the string returned by target_pid_to_str,
which actually converts a ptid (not pid) to a string.
This is the string that appears (at least in part) in the output of
'info threads' in the 'Target Id' column, but also in the thread
exited message that GDB prints.
Having access to this string from Python is useful for allowing
extensions identify threads in a similar way to how GDB core would
identify the thread.
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/python.texi | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gdb/doc/python.texi b/gdb/doc/python.texi index d74defe..da37348 100644 --- a/gdb/doc/python.texi +++ b/gdb/doc/python.texi @@ -4084,6 +4084,13 @@ Either the LWPID or TID may be 0, which indicates that the operating system does not use that identifier. @end defvar +@defvar InferiorThread.ptid_string +This read-only attribute contains a string representing +@code{InferiorThread.ptid}. This is the string that @value{GDBN} uses +in the @samp{Target Id} column in the @kbd{info threads} output +(@pxref{info_threads,,@samp{info threads}}). +@end defvar + @defvar InferiorThread.inferior The inferior this thread belongs to. This attribute is represented as a @code{gdb.Inferior} object. This attribute is not writable. |