aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-event.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2024-09-11 10:35:20 -0600
committerTom Tromey <tromey@adacore.com>2024-09-23 13:44:59 -0600
commit336bb2a1c1d24f5db07394a109f7cd6c5b58b10d (patch)
tree5a8d54ecc8d127a2113712203f1c66aa9c5d8c0e /gdb/python/py-event.h
parentb9155b800c6be57a7f4933a4fd8c5c5d51414e77 (diff)
downloadbinutils-336bb2a1c1d24f5db07394a109f7cd6c5b58b10d.zip
binutils-336bb2a1c1d24f5db07394a109f7cd6c5b58b10d.tar.gz
binutils-336bb2a1c1d24f5db07394a109f7cd6c5b58b10d.tar.bz2
Automatically add types to Python modules
PR python/32163 points out that various types provided by gdb are not added to the gdb module, so they aren't available for interactive inspection. I think this is just an oversight. This patch fixes the problem by introducing a new helper function that both readies the type and then adds it to the appropriate module. The patch also poisons PyType_Ready, the idea being to avoid this bug in the future. v2: * Fixed a bug in original patch in gdb.Architecture registration * Added regression test for the types mentioned in the bug Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32163 Reviewed-By: Alexandra Petlanova Hajkova <ahajkova@redhat.com>
Diffstat (limited to 'gdb/python/py-event.h')
-rw-r--r--gdb/python/py-event.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/gdb/python/py-event.h b/gdb/python/py-event.h
index 388c513..a723824 100644
--- a/gdb/python/py-event.h
+++ b/gdb/python/py-event.h
@@ -84,7 +84,5 @@ extern void evpy_dealloc (PyObject *self);
extern int evpy_add_attribute (PyObject *event,
const char *name, PyObject *attr)
CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION;
-int gdbpy_initialize_event_generic (PyTypeObject *type, const char *name)
- CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION;
#endif /* PYTHON_PY_EVENT_H */