mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-28 18:10:46 +00:00
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>
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user