2010-06-28 Phil Muldoon <pmuldoon@redhat.com>
Tom Tromey <tromey@redhat.com> Thiago Jung Bauermann <bauerman@br.ibm.com> * value.c (pack_unsigned_long): New function. (value_from_ulongest): New function. * value.h (value_from_ulongest): Declare. * python/python.c (_initialize_python): Call gdbpy_initialize_thread and gdbpy_initialize_inferior. * python/python-internal.h: Define thread_object. (gdbpy_inferiors, gdbpy_selected_thread) (frame_info_to_frame_object, create_thread_object) (find_thread_object, find_inferior_object) (gdbpy_initialize_thread, gdbpy_initialize_inferiors) (gdbpy_is_value_object, get_addr_from_python): Declare. * python/py-value.c (builtin_type_upylong): Define. (convert_value_from_python): Add logic for ulongest. (gdbpy_is_value_object): New function. * python/py-utils.c (get_addr_from_python): New function. * python/py-frame.c (frame_info_to_frame_object): Return a PyObject. (gdbpy_selected_frame): Use PyObject over frame_info. * Makefile.in (SUBDIR_PYTHON_OBS): Add py-inferior and py-infthread. (SUBDIR_PYTHON_SRCS): Likewise. (py-inferior.o): New Rule. (py-infthread.o): New Rule. * python/py-inferior.c: New File. * python/py-infthread.c: New File. 2010-06-28 Phil Muldoon <pmuldoon@redhat.com> Tom Tromey <tromey@redhat.com> Thiago Jung Bauermann <bauerman@br.ibm.com> * gdb.texinfo (Inferiors In Python): New node. * gdb.texinfo (Threads In Python): New node. 2010-06-28 Phil Muldoon <pmuldoon@redhat.com> Tom Tromey <tromey@redhat.com> Thiago Jung Bauermann <bauerman@br.ibm.com> * gdb.python/py-inferior.c: New File. * gdb.python/py-infthread.c: New File. * gdb.python/py-inferior.exp: New File. * gdb.python/py-infthread.exp: New File.
This commit is contained in:
parent
4802450ac9
commit
595939dea1
20 changed files with 1672 additions and 11 deletions
|
@ -265,7 +265,7 @@ frapy_function (PyObject *self, PyObject *args)
|
|||
/* Convert a frame_info struct to a Python Frame object.
|
||||
Sets a Python exception and returns NULL on error. */
|
||||
|
||||
static frame_object *
|
||||
PyObject *
|
||||
frame_info_to_frame_object (struct frame_info *frame)
|
||||
{
|
||||
frame_object *frame_obj;
|
||||
|
@ -296,7 +296,7 @@ frame_info_to_frame_object (struct frame_info *frame)
|
|||
|
||||
frame_obj->gdbarch = get_frame_arch (frame);
|
||||
|
||||
return frame_obj;
|
||||
return (PyObject *) frame_obj;
|
||||
}
|
||||
|
||||
/* Implementation of gdb.Frame.older (self) -> gdb.Frame.
|
||||
|
@ -497,7 +497,7 @@ PyObject *
|
|||
gdbpy_selected_frame (PyObject *self, PyObject *args)
|
||||
{
|
||||
struct frame_info *frame;
|
||||
frame_object *frame_obj = NULL; /* Initialize to appease gcc warning. */
|
||||
PyObject *frame_obj = NULL; /* Initialize to appease gcc warning. */
|
||||
volatile struct gdb_exception except;
|
||||
|
||||
TRY_CATCH (except, RETURN_MASK_ALL)
|
||||
|
@ -507,7 +507,7 @@ gdbpy_selected_frame (PyObject *self, PyObject *args)
|
|||
}
|
||||
GDB_PY_HANDLE_EXCEPTION (except);
|
||||
|
||||
return (PyObject *) frame_obj;
|
||||
return frame_obj;
|
||||
}
|
||||
|
||||
/* Implementation of gdb.stop_reason_string (Integer) -> String.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue