aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-cmd.c
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2023-03-10 10:28:21 +0000
committerAndrew Burgess <aburgess@redhat.com>2023-03-30 10:25:46 +0100
commitdf4447e4c43e105bd6366081a07447506506f78b (patch)
tree0dcc6e9beb254d99970084b2802e1a0ef4fd5c72 /gdb/python/py-cmd.c
parent7e6af18d0c7df5d1ee6144ef0e09b32db3a347e7 (diff)
downloadbinutils-df4447e4c43e105bd6366081a07447506506f78b.zip
binutils-df4447e4c43e105bd6366081a07447506506f78b.tar.gz
binutils-df4447e4c43e105bd6366081a07447506506f78b.tar.bz2
gdb/python: remove Py_TPFLAGS_BASETYPE from gdb.UnwindInfo
It is not currently possible to directly create gdb.UnwindInfo instances, they need to be created by calling gdb.PendingFrame.create_unwind_info so that the newly created UnwindInfo can be linked to the pending frame. As such there's no tp_init method defined for UnwindInfo. A consequence of all this is that it doesn't really make sense to allow sub-classing of gdb.UnwindInfo. Any sub-class can't call the parents __init__ method to correctly link up the PendingFrame object (there is no parent __init__ method). And any instances that sub-classes UnwindInfo but doesn't call the parent __init__ is going to be invalid for use in GDB. This commit removes the Py_TPFLAGS_BASETYPE flag from the UnwindInfo class, which prevents the class being sub-classed. Then I've added a test to check that this is indeed prevented. Any functional user code will not have any issues with this change. Reviewed-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/python/py-cmd.c')
0 files changed, 0 insertions, 0 deletions