summaryrefslogtreecommitdiff
path: root/gdb/python/py-infthread.c
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2024-01-04 16:46:40 +0000
committerAndrew Burgess <aburgess@redhat.com>2024-01-12 11:21:30 +0000
commit13cd9bceea3c3a3081c463597146a11ade765e39 (patch)
tree8c2a7b96be594b13b55b320d17d89468303016a2 /gdb/python/py-infthread.c
parent2f47f48fe55eb72bfe4d3c5291a74f4a53121c5e (diff)
gdb/python: Add gdb.Inferior.__dict__ attribute
The gdb.Objfile, gdb.Progspace, and gdb.Type 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.Inferior type. After this commit there is a new gdb.Inferior.__dict__ attribute, which is a dictionary. A user can, for example, do this: (gdb) pi >>> i = gdb.selected_inferior() >>> i._user_attribute = 123 >>> i._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/python/py-infthread.c')
0 files changed, 0 insertions, 0 deletions