aboutsummaryrefslogtreecommitdiff
path: root/gdb/NEWS
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2024-01-05 11:05:51 +0000
committerAndrew Burgess <aburgess@redhat.com>2024-01-12 11:21:31 +0000
commit1d586eda5c90bb9e03e997682dce60811f978def (patch)
treea5f9b50150dce957035c62bd90f5e4ae7750d793 /gdb/NEWS
parent13cd9bceea3c3a3081c463597146a11ade765e39 (diff)
downloadbinutils-1d586eda5c90bb9e03e997682dce60811f978def.zip
binutils-1d586eda5c90bb9e03e997682dce60811f978def.tar.gz
binutils-1d586eda5c90bb9e03e997682dce60811f978def.tar.bz2
gdb/python: Add gdb.InferiorThread.__dict__ attribute
The gdb.Objfile, gdb.Progspace, gdb.Type, and gdb.Inferior Python types already have a __dict__ attribute, which allows users to create user defined attributes within the objects. This is useful if the user wants to cache information within an object. This commit adds the same functionality to the gdb.InferiorThread type. After this commit there is a new gdb.InferiorThread.__dict__ attribute, which is a dictionary. A user can, for example, do this: (gdb) pi >>> t = gdb.selected_thread() >>> t._user_attribute = 123 >>> t._user_attribute 123 >>> There's a new test included. Reviewed-By: Eli Zaretskii <eliz@gnu.org> Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/NEWS')
-rw-r--r--gdb/NEWS4
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/NEWS b/gdb/NEWS
index 92e7f32..bab300e 100644
--- a/gdb/NEWS
+++ b/gdb/NEWS
@@ -104,6 +104,10 @@ show remote thread-options-packet
these will be stored in the object's new Inferior.__dict__
attribute.
+ ** User defined attributes can be added to a gdb.InferiorThread
+ object, these will be stored in the object's new
+ InferiorThread.__dict__ attribute.
+
* Debugger Adapter Protocol changes
** GDB now emits the "process" event.