]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/doc/python.texi
gdb/python: Add gdb.InferiorThread.details attribute
authorAndrew Burgess <aburgess@redhat.com>
Mon, 14 Feb 2022 17:02:03 +0000 (17:02 +0000)
committerAndrew Burgess <aburgess@redhat.com>
Mon, 28 Feb 2022 17:01:31 +0000 (17:01 +0000)
commit659971cb0f8fd749aa951221d99de2868a860d07
treea8d9a06e3d9b934d302dd05440c213b9ea35e3c9
parentea764154c27a11619ba764a4c92f395ba5007234
gdb/python: Add gdb.InferiorThread.details attribute

This adds a new read-only attribute gdb.InferiorThread.details, this
attribute contains a string, the results of target_extra_thread_info
for the thread, or None, if target_extra_thread_info returns nullptr.

As the string returned by target_extra_thread_info is unstructured,
this attribute is only really useful for echoing straight through to
the user, but, if a user wants to write a command that displays the
same, or a similar 'Thread Id' to the one seen in 'info threads', then
they need access to this string.

Given that the string produced by target_extra_thread_info varies by
target, there's only minimal testing of this attribute, I check that
the attribute can be accessed, and that the return value is either
None, or a string.
gdb/NEWS
gdb/doc/gdb.texinfo
gdb/doc/python.texi
gdb/python/py-infthread.c
gdb/testsuite/gdb.python/py-infthread.exp