]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb/python: New InferiorThread.ptid_string attribute
authorAndrew Burgess <aburgess@redhat.com>
Tue, 9 Jan 2024 17:29:24 +0000 (17:29 +0000)
committerAndrew Burgess <aburgess@redhat.com>
Fri, 12 Jan 2024 09:22:25 +0000 (09:22 +0000)
commit76118e1675f5eaf3fc44524ec435981705572629
tree4f4351eece10850ac947757b538a795a72e43491
parent322ffd247e4e95a0d5a1b11ad1ef91f3378e6174
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>
gdb/NEWS
gdb/doc/python.texi
gdb/python/py-infthread.c
gdb/testsuite/gdb.python/py-infthread.exp