diff options
author | Tom Tromey <tromey@redhat.com> | 2012-02-17 19:24:27 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2012-02-17 19:24:27 +0000 |
commit | 2e8265fd8b24634b3d5c9f47fae5fa0cd157714e (patch) | |
tree | db2d168d6872b28be60c9fe8f9994cb6c091e94b /gdb/python/py-event.c | |
parent | 8544a1503d0764c676b1825e0f4024bfb1c0197d (diff) | |
download | gdb-2e8265fd8b24634b3d5c9f47fae5fa0cd157714e.zip gdb-2e8265fd8b24634b3d5c9f47fae5fa0cd157714e.tar.gz gdb-2e8265fd8b24634b3d5c9f47fae5fa0cd157714e.tar.bz2 |
PR python/12070:
* python/py-event.c (event_object_getset): New global.
(event_object_type): Reference it.
* python/py-type.c (field_object_getset): New global.
(field_object_type): Reference it.
* python/python-internal.h (gdb_py_generic_dict): Declare.
* python/py-utils.c (gdb_py_generic_dict): New function.
testsuite/gdb
* gdb.python/py-events.py (exit_handler): Add test for 'dir'.
* gdb.python/py-events.exp: Check 'dir' output.
* gdb.python/py-type.exp (test_fields): Add test for 'dir'.
Diffstat (limited to 'gdb/python/py-event.c')
-rw-r--r-- | gdb/python/py-event.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gdb/python/py-event.c b/gdb/python/py-event.c index 7d4ff14..4789761 100644 --- a/gdb/python/py-event.c +++ b/gdb/python/py-event.c @@ -132,6 +132,13 @@ evpy_emit_event (PyObject *event, return -1; } +static PyGetSetDef event_object_getset[] = +{ + { "__dict__", gdb_py_generic_dict, NULL, + "The __dict__ for this event.", &event_object_type }, + { NULL } +}; + PyTypeObject event_object_type = { PyObject_HEAD_INIT (NULL) @@ -164,7 +171,7 @@ PyTypeObject event_object_type = 0, /* tp_iternext */ 0, /* tp_methods */ 0, /* tp_members */ - 0, /* tp_getset */ + event_object_getset, /* tp_getset */ 0, /* tp_base */ 0, /* tp_dict */ 0, /* tp_descr_get */ |