GDB (xrefs)
|
#include "defs.h"
#include "arch-utils.h"
#include "frame-unwind.h"
#include "gdbsupport/gdb_obstack.h"
#include "gdbcmd.h"
#include "language.h"
#include "observable.h"
#include "python-internal.h"
#include "regcache.h"
#include "valprint.h"
#include "user-regs.h"
Go to the source code of this file.
Classes | |
struct | pending_frame_object |
struct | saved_reg |
struct | unwind_info_object |
struct | cached_frame_info |
struct | pyuw_gdbarch_data_type |
Macros | |
#define | pyuw_debug_printf(fmt, ...) debug_prefixed_printf_cond (pyuw_debug, "py-unwind", fmt, ##__VA_ARGS__) |
#define | PYUW_SCOPED_DEBUG_ENTER_EXIT scoped_debug_enter_exit (pyuw_debug, "py-unwind") |
Functions | |
static void | show_pyuw_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) |
PyTypeObject pending_frame_object_type | CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("pending_frame_object") |
PyTypeObject unwind_info_object_type | CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF ("unwind_info_object") |
static int | pyuw_value_obj_to_pointer (PyObject *pyo_value, CORE_ADDR *addr) |
static int | pyuw_object_attribute_to_pointer (PyObject *pyo, const char *attr_name, CORE_ADDR *addr) |
static PyObject * | unwind_infopy_str (PyObject *self) |
static PyObject * | pyuw_create_unwind_info (PyObject *pyo_pending_frame, struct frame_id frame_id) |
static PyObject * | unwind_infopy_add_saved_register (PyObject *self, PyObject *args) |
static void | unwind_infopy_dealloc (PyObject *self) |
static PyObject * | pending_framepy_str (PyObject *self) |
static PyObject * | pending_framepy_read_register (PyObject *self, PyObject *args) |
static PyObject * | pending_framepy_create_unwind_info (PyObject *self, PyObject *args) |
static PyObject * | pending_framepy_architecture (PyObject *self, PyObject *args) |
static PyObject * | pending_framepy_level (PyObject *self, PyObject *args) |
static void | pyuw_this_id (frame_info_ptr this_frame, void **cache_ptr, struct frame_id *this_id) |
static struct value * | pyuw_prev_register (frame_info_ptr this_frame, void **cache_ptr, int regnum) |
static int | pyuw_sniffer (const struct frame_unwind *self, frame_info_ptr this_frame, void **cache_ptr) |
static void | pyuw_dealloc_cache (frame_info *this_frame, void *cache) |
static void | pyuw_on_new_gdbarch (struct gdbarch *newarch) |
void | _initialize_py_unwind () |
int | gdbpy_initialize_unwind (void) |
Variables | |
static bool | pyuw_debug |
static const registry< gdbarch >::key< pyuw_gdbarch_data_type > | pyuw_gdbarch_data |
static PyMethodDef | pending_frame_object_methods [] |
PyTypeObject | pending_frame_object_type |
static PyMethodDef | unwind_info_object_methods [] |
PyTypeObject | unwind_info_object_type |
#define pyuw_debug_printf | ( | fmt, | |
... | |||
) | debug_prefixed_printf_cond (pyuw_debug, "py-unwind", fmt, ##__VA_ARGS__) |
Definition at line 47 of file py-unwind.c.
#define PYUW_SCOPED_DEBUG_ENTER_EXIT scoped_debug_enter_exit (pyuw_debug, "py-unwind") |
Definition at line 52 of file py-unwind.c.
void _initialize_py_unwind | ( | ) |
Definition at line 687 of file py-unwind.c.
Referenced by initialize_all_files().
PyTypeObject pending_frame_object_type CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF | ( | "pending_frame_object" | ) |
PyTypeObject unwind_info_object_type CPYCHECKER_TYPE_OBJECT_FOR_TYPEDEF | ( | "unwind_info_object" | ) |
int gdbpy_initialize_unwind | ( | void | ) |
Definition at line 702 of file py-unwind.c.
References gdb::observers::architecture_changed, gdb_module, gdb_pymodule_addobject(), pending_frame_object_type, pyuw_on_new_gdbarch(), and unwind_info_object_type.
Referenced by do_start_initialization().
|
static |
Definition at line 445 of file py-unwind.c.
References pending_frame_object::frame_info, pending_frame_object::gdbarch, and gdbarch_to_arch_object().
|
static |
Definition at line 408 of file py-unwind.c.
References frame_id_build(), frame_id_build_special(), frame_id_build_wild(), pyuw_create_unwind_info(), and pyuw_object_attribute_to_pointer().
|
static |
Definition at line 461 of file py-unwind.c.
References pending_frame_object::frame_info, frame_relative_level(), and gdb_py_object_from_longest().
|
static |
Definition at line 365 of file py-unwind.c.
References pending_frame_object::frame_info, GDB_PY_HANDLE_EXCEPTION, pending_frame_object::gdbarch, gdbpy_parse_register_id(), regnum, value_of_register(), and value_to_value_object().
|
static |
Definition at line 340 of file py-unwind.c.
References GDB_PY_HANDLE_EXCEPTION, get_frame_pc(), and get_frame_sp().
|
static |
Definition at line 221 of file py-unwind.c.
References unwind_info_object::frame_id, unwind_info_object::pending_frame, unwind_info_object::saved_regs, and unwind_info_object_type.
Referenced by pending_framepy_create_unwind_info().
|
static |
Definition at line 638 of file py-unwind.c.
References cached_reg_t::data, PYUW_SCOPED_DEBUG_ENTER_EXIT, cached_frame_info::reg, cached_frame_info::reg_count, and xfree().
Referenced by pyuw_on_new_gdbarch().
|
static |
Definition at line 152 of file py-unwind.c.
References pyuw_value_obj_to_pointer().
Referenced by pending_framepy_create_unwind_info().
|
static |
Definition at line 661 of file py-unwind.c.
References frame_unwind::dealloc_cache, default_frame_unwind_stop_reason(), frame_unwind_prepend_unwinder(), GDBARCH_OBSTACK_ZALLOC, registry< T >::get(), frame_unwind::name, NORMAL_FRAME, frame_unwind::prev_register, pyuw_dealloc_cache(), pyuw_gdbarch_data, pyuw_prev_register(), pyuw_sniffer(), pyuw_this_id(), frame_unwind::sniffer, frame_unwind::stop_reason, frame_unwind::this_id, frame_unwind::type, and frame_unwind::unwind_data.
Referenced by gdbpy_initialize_unwind().
|
static |
Definition at line 488 of file py-unwind.c.
References cached_reg_t::data, frame_relative_level(), frame_unwind_got_bytes(), frame_unwind_got_optimized(), cached_reg_t::num, pyuw_debug_printf, PYUW_SCOPED_DEBUG_ENTER_EXIT, cached_frame_info::reg, cached_frame_info::reg_count, and regnum.
Referenced by pyuw_on_new_gdbarch().
|
static |
Definition at line 511 of file py-unwind.c.
References cached_reg_t::data, unwind_info_object::frame_id, cached_frame_info::frame_id, pending_frame_object::frame_info, frame_relative_level(), gdb_python_module, pending_frame_object::gdbarch, cached_frame_info::gdbarch, gdbpy_print_stack(), gdbpy_print_stack_or_quit(), get_frame_pc(), get_frame_sp(), name, cached_reg_t::num, paddress(), pending_frame_object_type, python_string_to_host_string(), pyuw_debug, pyuw_debug_printf, PYUW_SCOPED_DEBUG_ENTER_EXIT, cached_frame_info::reg, value::reg, cached_frame_info::reg_count, register_size(), unwind_info_object::saved_regs, frame_unwind::unwind_data, unwind_info_object_type, value_contents(), value_object_to_value(), value_type(), and xmalloc().
Referenced by pyuw_on_new_gdbarch().
|
static |
Definition at line 478 of file py-unwind.c.
References pyuw_debug_printf, and frame_id::to_string().
Referenced by pyuw_on_new_gdbarch().
|
static |
Definition at line 124 of file py-unwind.c.
References gdbpy_convert_exception(), unpack_pointer(), value_contents(), value_object_to_value(), and value_type().
Referenced by pyuw_object_attribute_to_pointer().
|
static |
Definition at line 39 of file py-unwind.c.
References gdb_printf().
|
static |
Definition at line 244 of file py-unwind.c.
References pending_frame_object::frame_info, pending_frame_object::gdbarch, gdbarch_num_cooked_regs(), gdbpy_parse_register_id(), lval_register, unwind_info_object::pending_frame, value::reg, register_size(), regnum, unwind_info_object::saved_regs, VALUE_LVAL, value_object_to_value(), value_of_user_reg(), VALUE_REGNUM, and value_type().
|
static |
Definition at line 327 of file py-unwind.c.
References unwind_info_object::pending_frame, and unwind_info_object::saved_regs.
|
static |
Definition at line 178 of file py-unwind.c.
References string_file::c_str(), unwind_info_object::frame_id, GDB_PY_HANDLE_EXCEPTION, get_user_print_options(), ui_file::printf(), ui_file::puts(), value::reg, unwind_info_object::saved_regs, frame_id::to_string(), value_object_to_value(), and value_print().
|
static |
Definition at line 720 of file py-unwind.c.
PyTypeObject pending_frame_object_type |
Definition at line 739 of file py-unwind.c.
Referenced by gdbpy_initialize_unwind(), and pyuw_sniffer().
|
static |
Definition at line 34 of file py-unwind.c.
Referenced by pyuw_sniffer().
|
static |
Definition at line 655 of file py-unwind.c.
Referenced by pyuw_on_new_gdbarch().
|
static |
Definition at line 780 of file py-unwind.c.
PyTypeObject unwind_info_object_type |
Definition at line 789 of file py-unwind.c.
Referenced by gdbpy_initialize_unwind(), pyuw_create_unwind_info(), and pyuw_sniffer().