From 89c73adef9f9fac7e1efeb6961a867f46e54e24b Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 28 May 2009 00:40:24 +0000 Subject: gdb 2009-04-01 Tom Tromey Thiago Jung Bauermann Phil Muldoon * python/python.c: Include objfiles.h, observer.h. (gdbpy_auto_load): New global. (gdbpy_current_objfile): Likewise. (GDBPY_AUTO_FILENAME): New define. (gdbpy_new_objfile): New function. (gdbpy_get_current_objfile): Likewise. (gdbpy_objfiles): Likewise. (_initialize_python): Add "maint set auto-load". Call gdbpy_initialize_objfile. Attach objfile observer. (GdbMethods): New methods current_objfile, objfiles. * python/python-objfile.c: New file. * python/python-internal.h (objfile_to_objfile_object): Declare. (objfpy_get_printers): Likewise. (gdbpy_initialize_objfile): Likewise. * Makefile.in (SUBDIR_PYTHON_OBS): Add python-objfile.o. (SUBDIR_PYTHON_SRCS): Add python-objfile.c. (python-objfile.o): New target. gdb/doc 2009-04-01 Tom Tromey Thiago Jung Bauermann * gdb.texinfo (Python API): Update. (Auto-loading): New node. (Objfiles In Python): New node. gdb/testsuite 2009-04-06 Tom Tromey * gdb.python/python.exp (gdb_py_test_multiple): Add two objfile tests. * gdb.python/python-value.exp (py_objfile_tests): New proc. Call it. --- gdb/python/python-internal.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gdb/python/python-internal.h') diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h index f8d0896..f16b509 100644 --- a/gdb/python/python-internal.h +++ b/gdb/python/python-internal.h @@ -68,6 +68,9 @@ PyObject *gdbpy_frame_stop_reason_string (PyObject *, PyObject *); PyObject *gdbpy_selected_frame (PyObject *self, PyObject *args); PyObject *value_to_value_object (struct value *v); +PyObject *objfile_to_objfile_object (struct objfile *); + +PyObject *objfpy_get_printers (PyObject *, void *); struct value *convert_value_from_python (PyObject *obj); @@ -75,6 +78,7 @@ void gdbpy_initialize_values (void); void gdbpy_initialize_frames (void); void gdbpy_initialize_commands (void); void gdbpy_initialize_functions (void); +void gdbpy_initialize_objfile (void); struct cleanup *make_cleanup_py_decref (PyObject *py); struct cleanup *make_cleanup_py_restore_gil (PyGILState_STATE *state); -- cgit v1.1