GDB (xrefs)
|
#include "defs.h"
#include "gdbcore.h"
#include "gdbthread.h"
#include "inferior.h"
#include "objfiles.h"
#include "observer.h"
#include "python-internal.h"
#include "arch-utils.h"
#include "language.h"
#include "gdb_signals.h"
#include "py-event.h"
#include "py-stopevent.h"
Go to the source code of this file.
Classes | |
struct | threadlist_entry |
struct | inferior_object |
struct | membuf_object |
Macros | |
#define | INFPY_REQUIRE_VALID(Inferior) |
#define | CHARBUFFERPROC_NAME charbufferproc |
Functions | |
PyTypeObject inferior_object_type | CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("inferior_object") |
PyTypeObject membuf_object_type | CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("membuf_object") |
static void | python_on_normal_stop (struct bpstats *bs, int print_frame) |
static void | python_on_resume (ptid_t ptid) |
static void | python_on_inferior_call_pre (ptid_t thread, CORE_ADDR address) |
static void | python_on_inferior_call_post (ptid_t thread, CORE_ADDR address) |
static void | python_on_memory_change (struct inferior *inferior, CORE_ADDR addr, ssize_t len, const bfd_byte *data) |
static void | python_on_register_change (struct frame_info *frame, int regnum) |
static void | python_inferior_exit (struct inferior *inf) |
static void | python_new_objfile (struct objfile *objfile) |
PyObject * | inferior_to_inferior_object (struct inferior *inferior) |
PyObject * | find_inferior_object (int pid) |
thread_object * | find_thread_object (ptid_t ptid) |
static void | add_thread_object (struct thread_info *tp) |
static void | delete_thread_object (struct thread_info *tp, int ignore) |
static PyObject * | infpy_threads (PyObject *self, PyObject *args) |
static PyObject * | infpy_get_num (PyObject *self, void *closure) |
static PyObject * | infpy_get_pid (PyObject *self, void *closure) |
static PyObject * | infpy_get_was_attached (PyObject *self, void *closure) |
static int | build_inferior_list (struct inferior *inf, void *arg) |
PyObject * | gdbpy_inferiors (PyObject *unused, PyObject *unused2) |
static PyObject * | infpy_read_memory (PyObject *self, PyObject *args, PyObject *kw) |
static PyObject * | infpy_write_memory (PyObject *self, PyObject *args, PyObject *kw) |
static void | mbpy_dealloc (PyObject *self) |
static PyObject * | mbpy_str (PyObject *self) |
static Py_ssize_t | get_read_buffer (PyObject *self, Py_ssize_t segment, void **ptrptr) |
static Py_ssize_t | get_write_buffer (PyObject *self, Py_ssize_t segment, void **ptrptr) |
static Py_ssize_t | get_seg_count (PyObject *self, Py_ssize_t *lenp) |
static Py_ssize_t | get_char_buffer (PyObject *self, Py_ssize_t segment, char **ptrptr) |
static PyObject * | infpy_search_memory (PyObject *self, PyObject *args, PyObject *kw) |
static PyObject * | infpy_is_valid (PyObject *self, PyObject *args) |
static void | infpy_dealloc (PyObject *obj) |
static void | py_free_inferior (struct inferior *inf, void *datum) |
PyObject * | gdbpy_selected_inferior (PyObject *self, PyObject *args) |
int | gdbpy_initialize_inferior (void) |
Variables | |
static const struct inferior_data * | infpy_inf_data_key |
static PyGetSetDef | inferior_object_getset [] |
static PyMethodDef | inferior_object_methods [] |
PyTypeObject | inferior_object_type |
static PyBufferProcs | buffer_procs |
PyTypeObject | membuf_object_type |
#define CHARBUFFERPROC_NAME charbufferproc |
Definition at line 989 of file py-inferior.c.
#define INFPY_REQUIRE_VALID | ( | Inferior | ) |
Definition at line 71 of file py-inferior.c.
Referenced by infpy_get_num(), infpy_get_pid(), infpy_get_was_attached(), and infpy_threads().
|
static |
Definition at line 313 of file py-inferior.c.
References create_thread_object(), do_cleanups(), ensure_python_env(), gdb_python_initialized, gdbpy_print_stack(), thread_object::inf_obj, threadlist_entry::next, inferior_object::nthreads, python_gdbarch, python_language, threadlist_entry::thread_obj, inferior_object::threads, and xmalloc().
Referenced by gdbpy_initialize_inferior().
Definition at line 457 of file py-inferior.c.
References inferior_to_inferior_object(), and Py_DECREF.
Referenced by gdbpy_inferiors().
PyTypeObject inferior_object_type CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF | ( | "inferior_object" | ) |
PyTypeObject membuf_object_type CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF | ( | "membuf_object" | ) |
|
static |
Definition at line 346 of file py-inferior.c.
References do_cleanups(), ensure_python_env(), find_inferior_object(), gdb_python_initialized, threadlist_entry::next, inferior_object::nthreads, thread_info::ptid, ptid_get_pid(), Py_DECREF, python_gdbarch, python_language, thread_object::thread, threadlist_entry::thread_obj, inferior_object::threads, and xfree().
Referenced by gdbpy_initialize_inferior().
PyObject* find_inferior_object | ( | int | pid | ) |
Definition at line 269 of file py-inferior.c.
References find_inferior_pid(), and inferior_to_inferior_object().
Referenced by create_thread_object(), delete_thread_object(), and find_thread_object().
thread_object* find_thread_object | ( | ptid_t | ptid | ) |
Definition at line 280 of file py-inferior.c.
References find_inferior_object(), threadlist_entry::next, pid, thread_info::ptid, ptid_equal(), ptid_get_pid(), Py_DECREF, thread_object::thread, and threadlist_entry::thread_obj.
Referenced by gdbpy_selected_thread(), and get_event_thread().
PyObject* gdbpy_inferiors | ( | PyObject * | unused, |
PyObject * | unused2 | ||
) |
Definition at line 478 of file py-inferior.c.
References build_inferior_list(), iterate_over_inferiors(), and Py_DECREF.
int gdbpy_initialize_inferior | ( | void | ) |
Definition at line 872 of file py-inferior.c.
References add_thread_object(), delete_thread_object(), gdb_module, gdb_pymodule_addobject(), inferior_object_type, infpy_inf_data_key, membuf_object_type, observer_attach_inferior_call_post(), observer_attach_inferior_call_pre(), observer_attach_inferior_exit(), observer_attach_memory_changed(), observer_attach_new_objfile(), observer_attach_new_thread(), observer_attach_normal_stop(), observer_attach_register_changed(), observer_attach_target_resumed(), observer_attach_thread_exit(), py_free_inferior(), python_inferior_exit(), python_new_objfile(), python_on_inferior_call_post(), python_on_inferior_call_pre(), python_on_memory_change(), python_on_normal_stop(), python_on_register_change(), and python_on_resume().
Referenced by _initialize_python().
PyObject* gdbpy_selected_inferior | ( | PyObject * | self, |
PyObject * | args | ||
) |
Definition at line 866 of file py-inferior.c.
References current_inferior(), and inferior_to_inferior_object().
|
static |
Definition at line 691 of file py-inferior.c.
References get_read_buffer().
|
static |
Definition at line 659 of file py-inferior.c.
References _, membuf_object::buffer, and membuf_object::length.
Referenced by get_char_buffer(), and get_write_buffer().
|
static |
Definition at line 682 of file py-inferior.c.
|
static |
Definition at line 676 of file py-inferior.c.
References get_read_buffer().
PyObject* inferior_to_inferior_object | ( | struct inferior * | inferior | ) |
Definition at line 241 of file py-inferior.c.
References inferior_object::inferior, inferior_object_type, infpy_inf_data_key, inferior_object::nthreads, and inferior_object::threads.
Referenced by build_inferior_list(), create_exited_event_object(), find_inferior_object(), and gdbpy_selected_inferior().
|
static |
Definition at line 818 of file py-inferior.c.
References inferior_object::inferior, and infpy_inf_data_key.
|
static |
Definition at line 426 of file py-inferior.c.
References inferior_object::inferior, INFPY_REQUIRE_VALID, and inferior::num.
|
static |
Definition at line 436 of file py-inferior.c.
References inferior_object::inferior, INFPY_REQUIRE_VALID, and inferior::pid.
|
static |
Definition at line 446 of file py-inferior.c.
References inferior::attach_flag, inferior_object::inferior, and INFPY_REQUIRE_VALID.
|
static |
Definition at line 807 of file py-inferior.c.
References inferior_object::inferior.
|
static |
Definition at line 505 of file py-inferior.c.
References CATCH, END_CATCH, GDB_PY_HANDLE_EXCEPTION, get_addr_from_python(), membuf_object_type, Py_DECREF, read_memory(), RETURN_MASK_ALL, TRY, xfree(), and xmalloc().
|
static |
Definition at line 713 of file py-inferior.c.
References _, CATCH, CORE_ADDR_MAX, END_CATCH, exception_none, GDB_PY_HANDLE_EXCEPTION, get_addr_from_python(), RETURN_MASK_ALL, target_search_memory(), and TRY.
|
static |
Definition at line 392 of file py-inferior.c.
References CATCH, END_CATCH, GDB_PY_HANDLE_EXCEPTION, INFPY_REQUIRE_VALID, threadlist_entry::next, inferior_object::nthreads, RETURN_MASK_ALL, threadlist_entry::thread_obj, inferior_object::threads, TRY, and update_thread_list().
|
static |
Definition at line 563 of file py-inferior.c.
References CATCH, END_CATCH, exception_none, GDB_PY_HANDLE_EXCEPTION, get_addr_from_python(), RETURN_MASK_ALL, TRY, and write_memory_with_notification().
|
static |
Definition at line 622 of file py-inferior.c.
|
static |
Definition at line 630 of file py-inferior.c.
References _, membuf_object::addr, membuf_object::length, paddress(), pulongest(), and python_gdbarch.
|
static |
Definition at line 832 of file py-inferior.c.
References do_cleanups(), ensure_python_env(), gdb_python_initialized, inferior_object::inferior, threadlist_entry::next, inferior_object::nthreads, Py_DECREF, python_gdbarch, python_language, threadlist_entry::thread_obj, inferior_object::threads, and xfree().
Referenced by gdbpy_initialize_inferior().
|
static |
Definition at line 186 of file py-inferior.c.
References current_language, do_cleanups(), emit_exited_event(), ensure_python_env(), inferior::exit_code, gdb_python_initialized, gdbpy_print_stack(), inferior::has_exit_code, and target_gdbarch().
Referenced by gdbpy_initialize_inferior().
|
static |
Definition at line 210 of file py-inferior.c.
References current_language, do_cleanups(), emit_clear_objfiles_event(), emit_new_objfile_event(), ensure_python_env(), gdb_python_initialized, gdbpy_print_stack(), get_objfile_arch(), and target_gdbarch().
Referenced by gdbpy_initialize_inferior().
Definition at line 139 of file py-inferior.c.
References current_language, do_cleanups(), emit_inferior_call_event(), ensure_python_env(), gdbpy_print_stack(), INFERIOR_CALL_POST, and target_gdbarch().
Referenced by gdbpy_initialize_inferior().
Definition at line 123 of file py-inferior.c.
References current_language, do_cleanups(), emit_inferior_call_event(), ensure_python_env(), gdbpy_print_stack(), INFERIOR_CALL_PRE, and target_gdbarch().
Referenced by gdbpy_initialize_inferior().
|
static |
Definition at line 156 of file py-inferior.c.
References current_language, do_cleanups(), emit_memory_changed_event(), ensure_python_env(), gdbpy_print_stack(), and target_gdbarch().
Referenced by gdbpy_initialize_inferior().
Definition at line 82 of file py-inferior.c.
References current_language, do_cleanups(), emit_stop_event(), ensure_python_env(), find_thread_ptid(), gdb_python_initialized, gdbpy_print_stack(), get_current_arch(), inferior_ptid, inferior_thread(), thread_suspend_state::stop_signal, and thread_info::suspend.
Referenced by gdbpy_initialize_inferior().
|
static |
Definition at line 173 of file py-inferior.c.
References current_language, do_cleanups(), emit_register_changed_event(), ensure_python_env(), gdbpy_print_stack(), and target_gdbarch().
Referenced by gdbpy_initialize_inferior().
|
static |
Definition at line 104 of file py-inferior.c.
References current_language, do_cleanups(), emit_continue_event(), ensure_python_env(), gdb_python_initialized, gdbpy_print_stack(), and target_gdbarch().
Referenced by gdbpy_initialize_inferior().
|
static |
Definition at line 992 of file py-inferior.c.
|
static |
Definition at line 903 of file py-inferior.c.
|
static |
Definition at line 913 of file py-inferior.c.
PyTypeObject inferior_object_type |
Definition at line 935 of file py-inferior.c.
Referenced by gdbpy_initialize_inferior(), and inferior_to_inferior_object().
|
static |
Definition at line 56 of file py-inferior.c.
Referenced by gdbpy_initialize_inferior(), inferior_to_inferior_object(), and infpy_dealloc().
PyTypeObject membuf_object_type |
Definition at line 1002 of file py-inferior.c.
Referenced by gdbpy_initialize_inferior(), and infpy_read_memory().