gdb
2009-05-27 Tom Tromey <tromey@redhat.com> Thiago Jung Bauermann <bauerman@br.ibm.com> Phil Muldoon <pmuldoon@redhat.com> Paul Pluzhnikov <ppluzhnikov@google.com> * python/python.c (_initialize_python): Call gdbpy_initialize_types. (GdbMethods): Add "lookup_type". * python/python-value.c (value_object) <type>: New field. (valpy_dealloc): Decref type. (valpy_new): Initialize type. (valpy_get_type): New function. (value_to_value_object): Initialize type. (valpy_cast): New function. (value_object_getset): Add "type". (value_object_methods): Add "cast". * python/python-internal.h (type_to_type_object): Declare. (type_object_to_type): Likewise. (gdbpy_initialize_types): Likewise. (gdbpy_lookup_type): Declare. * Makefile.in (SUBDIR_PYTHON_OBS): Add python-type.o. (SUBDIR_PYTHON_SRCS): Add python-type.c. (python-type.o): New target. * python/python-type.c: New file. gdb/doc 2009-05-27 Thiago Jung Bauermann <bauerman@br.ibm.com> Tom Tromey <tromey@redhat.com> * gdb.texinfo (Types In Python): New node. (Values From Inferior): "type" is now an attribute. (Python API): Update. gdb/testsuite 2009-05-27 Thiago Jung Bauermann <bauerman@br.ibm.com> Tom Tromey <tromey@redhat.com> Pedro Alves <pedro@codesourcery.com> Paul Pluzhnikov <ppluzhnikov@google.com> * gdb.python/python-template.exp: New file. * gdb.python/python-template.cc: New file. * gdb.python/python.exp (gdb_py_test_multiple): Add two objfile tests. * gdb.python/python-value.exp (py_objfile_tests): New proc. Call it. (test_value_after_death): New proc. * gdb.python/python-value.c (PTR): New typedef. (main): New variable 'x'.
This commit is contained in:
parent
89c73adef9
commit
2c74e83381
13 changed files with 1339 additions and 6 deletions
|
@ -552,6 +552,7 @@ Enables or disables auto-loading of Python code when an object is opened."),
|
|||
gdbpy_initialize_frames ();
|
||||
gdbpy_initialize_commands ();
|
||||
gdbpy_initialize_functions ();
|
||||
gdbpy_initialize_types ();
|
||||
gdbpy_initialize_objfile ();
|
||||
|
||||
PyRun_SimpleString ("import gdb");
|
||||
|
@ -618,6 +619,11 @@ Return the selected frame object." },
|
|||
"stop_reason_string (Integer) -> String.\n\
|
||||
Return a string explaining unwind stop reason." },
|
||||
|
||||
{ "lookup_type", (PyCFunction) gdbpy_lookup_type,
|
||||
METH_VARARGS | METH_KEYWORDS,
|
||||
"lookup_type (name [, block]) -> type\n\
|
||||
Return a Type corresponding to the given name." },
|
||||
|
||||
{ "write", gdbpy_write, METH_VARARGS,
|
||||
"Write a string using gdb's filtered stream." },
|
||||
{ "flush", gdbpy_flush, METH_NOARGS,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue