GDB (xrefs)
|
#include "defs.h"
#include "auto-load.h"
#include "gdbcore.h"
#include "gdbthread.h"
#include "inferior.h"
#include "objfiles.h"
#include "observable.h"
#include "python-internal.h"
#include "arch-utils.h"
#include "language.h"
#include "gdbsupport/gdb_signals.h"
#include "py-event.h"
#include "py-stopevent.h"
#include "progspace-and-thread.h"
#include <unordered_map>
Go to the source code of this file.
Classes | |
struct | inferior_object |
struct | infpy_deleter |
Macros | |
#define | INFPY_REQUIRE_VALID(Inferior) |
Typedefs | |
using | thread_map_t = std::unordered_map<thread_info *, gdbpy_ref<thread_object>> |
Functions | |
PyTypeObject inferior_object_type | CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("inferior_object") |
static void | python_on_normal_stop (struct bpstat *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 (frame_info_ptr frame, int regnum) |
static void | python_inferior_exit (struct inferior *inf) |
static void | python_new_objfile (struct objfile *objfile) |
static void | python_all_objfiles_removed (program_space *pspace) |
static void | python_free_objfile (struct objfile *objfile) |
gdbpy_ref< inferior_object > | inferior_to_inferior_object (struct inferior *inferior) |
static void | python_new_inferior (struct inferior *inf) |
static void | python_inferior_deleted (struct inferior *inf) |
gdbpy_ref | thread_to_thread_object (thread_info *thr) |
static void | add_thread_object (struct thread_info *tp) |
static void | delete_thread_object (thread_info *tp, gdb::optional< ULONGEST >, bool) |
static PyObject * | infpy_threads (PyObject *self, PyObject *args) |
static PyObject * | infpy_get_num (PyObject *self, void *closure) |
static PyObject * | infpy_get_connection (PyObject *self, void *closure) |
static PyObject * | infpy_get_connection_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 PyObject * | infpy_get_progspace (PyObject *self, void *closure) |
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 PyObject * | infpy_search_memory (PyObject *self, PyObject *args, PyObject *kw) |
static PyObject * | infpy_is_valid (PyObject *self, PyObject *args) |
static PyObject * | infpy_thread_from_thread_handle (PyObject *self, PyObject *args, PyObject *kw) |
static PyObject * | infpy_architecture (PyObject *self, PyObject *args) |
static PyObject * | infpy_repr (PyObject *obj) |
static PyObject * | infpy_clear_env (PyObject *obj) |
static PyObject * | infpy_set_env (PyObject *obj, PyObject *args, PyObject *kw) |
static PyObject * | infpy_unset_env (PyObject *obj, PyObject *args, PyObject *kw) |
static PyObject * | infpy_get_args (PyObject *self, void *closure) |
static int | infpy_set_args (PyObject *self, PyObject *value, void *closure) |
static PyObject * | infpy_get_main_name (PyObject *self, void *closure) |
static void | infpy_dealloc (PyObject *obj) |
PyObject * | gdbpy_selected_inferior (PyObject *self, PyObject *args) |
static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION | gdbpy_initialize_inferior (void) |
GDBPY_INITIALIZE_FILE (gdbpy_initialize_inferior) | |
Variables | |
static const registry< inferior >::key< inferior_object, infpy_deleter > | infpy_inf_data_key |
static gdb_PyGetSetDef | inferior_object_getset [] |
static PyMethodDef | inferior_object_methods [] |
PyTypeObject | inferior_object_type |
#define INFPY_REQUIRE_VALID | ( | Inferior | ) |
Definition at line 74 of file py-inferior.c.
Referenced by infpy_architecture(), infpy_clear_env(), infpy_get_args(), infpy_get_connection(), infpy_get_connection_num(), infpy_get_main_name(), infpy_get_num(), infpy_get_pid(), infpy_get_progspace(), infpy_get_was_attached(), infpy_read_memory(), infpy_search_memory(), infpy_set_env(), infpy_thread_from_thread_handle(), infpy_threads(), infpy_unset_env(), and infpy_write_memory().
using thread_map_t = std::unordered_map<thread_info *, gdbpy_ref<thread_object>> |
Definition at line 36 of file py-inferior.c.
|
static |
Definition at line 328 of file py-inferior.c.
References create_thread_event_object(), create_thread_object(), evpy_emit_event(), evregpy_no_listeners_p(), gdb_py_events, gdb_python_initialized, gdbpy_print_stack(), and inferior_object::threads.
Referenced by gdbpy_initialize_inferior().
|
extern |
|
static |
Definition at line 365 of file py-inferior.c.
References emit_thread_exit_event(), gdb_python_initialized, gdbpy_print_stack(), thread_info::inf, and inferior_to_inferior_object().
Referenced by gdbpy_initialize_inferior().
PyObject * gdbpy_inferiors | ( | PyObject * | unused, |
PyObject * | unused2 ) |
Definition at line 506 of file py-inferior.c.
References all_inferiors(), and inferior_to_inferior_object().
GDBPY_INITIALIZE_FILE | ( | gdbpy_initialize_inferior | ) |
|
static |
Definition at line 997 of file py-inferior.c.
References add_thread_object(), gdb::observers::all_objfiles_removed, auto_load_new_objfile_observer_token, delete_thread_object(), gdb::observers::free_objfile, gdb_module, gdb_pymodule_addobject(), gdb::observers::inferior_added, gdb::observers::inferior_call_post, gdb::observers::inferior_call_pre, gdb::observers::inferior_exit, inferior_object_type, gdb::observers::inferior_removed, gdb::observers::memory_changed, gdb::observers::new_objfile, gdb::observers::new_thread, gdb::observers::normal_stop, python_all_objfiles_removed(), python_free_objfile(), python_inferior_deleted(), python_inferior_exit(), python_new_inferior(), 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(), python_on_resume(), gdb::observers::register_changed, gdb::observers::target_resumed, and gdb::observers::thread_exit.
PyObject * gdbpy_selected_inferior | ( | PyObject * | self, |
PyObject * | args ) |
Definition at line 990 of file py-inferior.c.
References current_inferior(), and inferior_to_inferior_object().
gdbpy_ref< inferior_object > inferior_to_inferior_object | ( | struct inferior * | inferior | ) |
Definition at line 230 of file py-inferior.c.
References registry< T >::get(), inferior_object::inferior, inferior_object_type, infpy_inf_data_key, registry< T >::set(), and inferior_object::threads.
Referenced by create_exited_event_object(), create_thread_object(), delete_thread_object(), gdbpy_inferiors(), gdbpy_selected_inferior(), python_inferior_deleted(), python_new_inferior(), and thread_to_thread_object().
|
static |
Definition at line 784 of file py-inferior.c.
References gdbarch_to_arch_object(), and INFPY_REQUIRE_VALID.
|
static |
Definition at line 811 of file py-inferior.c.
References inferior::environment, inferior_object::inferior, and INFPY_REQUIRE_VALID.
|
static |
Definition at line 966 of file py-inferior.c.
References inferior_object::inferior.
|
static |
Definition at line 860 of file py-inferior.c.
References host_string_to_python_string(), and INFPY_REQUIRE_VALID.
|
static |
Definition at line 440 of file py-inferior.c.
References INFPY_REQUIRE_VALID, and target_to_connection_object().
|
static |
Definition at line 454 of file py-inferior.c.
References process_stratum_target::connection_number, gdb_py_object_from_longest(), and INFPY_REQUIRE_VALID.
|
static |
Definition at line 935 of file py-inferior.c.
References host_string_to_python_string(), INFPY_REQUIRE_VALID, main_name(), and name.
|
static |
Definition at line 427 of file py-inferior.c.
References gdb_py_object_from_longest(), and INFPY_REQUIRE_VALID.
|
static |
Definition at line 468 of file py-inferior.c.
References gdb_py_object_from_longest(), INFPY_REQUIRE_VALID, and inf::pid.
|
static |
Definition at line 491 of file py-inferior.c.
References INFPY_REQUIRE_VALID, and pspace_to_pspace_object().
|
static |
Definition at line 478 of file py-inferior.c.
References INFPY_REQUIRE_VALID.
|
static |
Definition at line 712 of file py-inferior.c.
|
static |
Definition at line 533 of file py-inferior.c.
References GDB_PY_HANDLE_EXCEPTION, gdb_PyArg_ParseTupleAndKeywords(), gdbpy_buffer_to_membuf(), get_addr_from_python(), INFPY_REQUIRE_VALID, read_memory(), and xmalloc().
|
static |
Definition at line 796 of file py-inferior.c.
References inferior_object::inferior, and inf::pid.
|
static |
Definition at line 637 of file py-inferior.c.
References GDB_PY_HANDLE_EXCEPTION, gdb_py_object_from_ulongest(), gdb_PyArg_ParseTupleAndKeywords(), get_addr_from_python(), INFPY_REQUIRE_VALID, and target_search_memory().
|
static |
Definition at line 876 of file py-inferior.c.
References gdbpy_is_string(), and python_string_to_host_string().
|
static |
Definition at line 824 of file py-inferior.c.
References inferior::environment, gdb_PyArg_ParseTupleAndKeywords(), inferior_object::inferior, INFPY_REQUIRE_VALID, and name.
|
static |
Definition at line 726 of file py-inferior.c.
References value::contents_all(), find_thread_by_handle(), GDB_PY_HANDLE_EXCEPTION, gdb_PyArg_ParseTupleAndKeywords(), gdbpy_is_value_object(), inferior_object::inferior, INFPY_REQUIRE_VALID, type::length(), thread_info, thread_to_thread_object(), value::type(), and value_object_to_value().
|
static |
Definition at line 394 of file py-inferior.c.
References GDB_PY_HANDLE_EXCEPTION, INFPY_REQUIRE_VALID, inferior_object::threads, and update_thread_list().
|
static |
Definition at line 843 of file py-inferior.c.
References inferior::environment, gdb_PyArg_ParseTupleAndKeywords(), inferior_object::inferior, INFPY_REQUIRE_VALID, and name.
|
static |
Definition at line 578 of file py-inferior.c.
References GDB_PY_HANDLE_EXCEPTION, gdb_PyArg_ParseTupleAndKeywords(), get_addr_from_python(), INFPY_REQUIRE_VALID, and write_memory_with_notification().
|
static |
Definition at line 199 of file py-inferior.c.
References emit_clear_objfiles_event(), gdb_python_initialized, gdbpy_print_stack(), and target_gdbarch().
Referenced by gdbpy_initialize_inferior().
|
static |
Definition at line 213 of file py-inferior.c.
References objfile::arch(), emit_free_objfile_event(), gdb_python_initialized, and gdbpy_print_stack().
Referenced by gdbpy_initialize_inferior().
|
static |
Definition at line 285 of file py-inferior.c.
References create_event_object(), evpy_add_attribute(), evpy_emit_event(), evregpy_no_listeners_p(), gdb_py_events, gdb_python_initialized, gdbpy_print_stack(), and inferior_to_inferior_object().
Referenced by gdbpy_initialize_inferior().
|
static |
Definition at line 166 of file py-inferior.c.
References emit_exited_event(), gdb_python_initialized, gdbpy_print_stack(), and target_gdbarch().
Referenced by gdbpy_initialize_inferior().
|
static |
Definition at line 257 of file py-inferior.c.
References create_event_object(), evpy_add_attribute(), evpy_emit_event(), evregpy_no_listeners_p(), gdb_py_events, gdb_python_initialized, gdbpy_print_stack(), and inferior_to_inferior_object().
Referenced by gdbpy_initialize_inferior().
|
static |
Definition at line 187 of file py-inferior.c.
References objfile::arch(), emit_new_objfile_event(), gdb_python_initialized, and gdbpy_print_stack().
Referenced by gdbpy_initialize_inferior().
|
static |
Definition at line 131 of file py-inferior.c.
References emit_inferior_call_event(), gdbpy_print_stack(), INFERIOR_CALL_POST, and target_gdbarch().
Referenced by gdbpy_initialize_inferior().
|
static |
Definition at line 119 of file py-inferior.c.
References emit_inferior_call_event(), gdbpy_print_stack(), INFERIOR_CALL_PRE, and target_gdbarch().
Referenced by gdbpy_initialize_inferior().
|
static |
Definition at line 144 of file py-inferior.c.
References emit_memory_changed_event(), gdbpy_print_stack(), and target_gdbarch().
Referenced by gdbpy_initialize_inferior().
|
static |
Definition at line 85 of file py-inferior.c.
References emit_stop_event(), gdb_python_initialized, gdbpy_print_stack(), inferior_ptid, inferior_thread(), and thread_info::stop_signal().
Referenced by gdbpy_initialize_inferior().
|
static |
Definition at line 157 of file py-inferior.c.
References emit_register_changed_event(), gdbpy_print_stack(), regnum, and target_gdbarch().
Referenced by gdbpy_initialize_inferior().
|
static |
Definition at line 104 of file py-inferior.c.
References emit_continue_event(), gdb_python_initialized, gdbpy_print_stack(), and target_gdbarch().
Referenced by gdbpy_initialize_inferior().
gdbpy_ref thread_to_thread_object | ( | thread_info * | thr | ) |
Definition at line 311 of file py-inferior.c.
References thread_info::inf, and inferior_to_inferior_object().
Referenced by emit_thread_exit_event(), gdbpy_selected_thread(), infpy_thread_from_thread_handle(), and py_get_event_thread().
|
static |
Definition at line 1038 of file py-inferior.c.
|
static |
Definition at line 1057 of file py-inferior.c.
PyTypeObject inferior_object_type |
Definition at line 1101 of file py-inferior.c.
Referenced by gdbpy_initialize_inferior(), and inferior_to_inferior_object().
|
static |
Definition at line 71 of file py-inferior.c.
Referenced by inferior_to_inferior_object().