GDB (xrefs)
|
#include "defs.h"
#include "arch-utils.h"
#include "frame-unwind.h"
#include "gdb_obstack.h"
#include "gdbcmd.h"
#include "language.h"
#include "observer.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 | reg_info |
struct | cached_frame_info |
struct | pyuw_gdbarch_data_type |
Macros | |
#define | TRACE_PY_UNWIND(level, args...) |
Functions | |
DEF_VEC_O (saved_reg) | |
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_parse_register_id (struct gdbarch *gdbarch, PyObject *pyo_reg_id, int *reg_num) |
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 void | pending_frame_invalidate (void *pyo_pending_frame) |
static void | pyuw_this_id (struct frame_info *this_frame, void **cache_ptr, struct frame_id *this_id) |
static struct value * | pyuw_prev_register (struct frame_info *this_frame, void **cache_ptr, int regnum) |
static int | pyuw_sniffer (const struct frame_unwind *self, struct frame_info *this_frame, void **cache_ptr) |
static void | pyuw_dealloc_cache (struct frame_info *this_frame, void *cache) |
static void * | pyuw_gdbarch_data_init (struct gdbarch *gdbarch) |
static void | pyuw_on_new_gdbarch (struct gdbarch *newarch) |
int | gdbpy_initialize_unwind (void) |
Variables | |
static unsigned int | pyuw_debug = 0 |
static struct gdbarch_data * | 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 TRACE_PY_UNWIND | ( | level, | |
args... | |||
) |
Definition at line 32 of file py-unwind.c.
Referenced by pyuw_dealloc_cache(), pyuw_prev_register(), and pyuw_sniffer().
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" | ) |
DEF_VEC_O | ( | saved_reg | ) |
int gdbpy_initialize_unwind | ( | void | ) |
Definition at line 660 of file py-unwind.c.
References _, add_setshow_zuinteger_cmd(), class_maintenance, gdb_module, gdb_pymodule_addobject(), gdbarch_data_register_post_init(), observer_attach_architecture_changed(), pending_frame_object_type, pyuw_debug, pyuw_gdbarch_data_init(), pyuw_on_new_gdbarch(), setdebuglist, showdebuglist, and unwind_info_object_type.
Referenced by _initialize_python().
|
static |
Definition at line 474 of file py-unwind.c.
Referenced by pyuw_sniffer().
|
static |
Definition at line 437 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 395 of file py-unwind.c.
References CATCH, END_CATCH, pending_frame_object::frame_info, GDB_PY_HANDLE_EXCEPTION, pending_frame_object::gdbarch, get_frame_register_value(), pyuw_parse_register_id(), regnum, RETURN_MASK_ALL, TRY, and value_to_value_object().
|
static |
Definition at line 369 of file py-unwind.c.
References CATCH, core_addr_to_string_nz(), END_CATCH, GDB_PY_HANDLE_EXCEPTION, get_frame_pc(), get_frame_sp(), RETURN_MASK_ALL, and TRY.
|
static |
Definition at line 258 of file py-unwind.c.
References unwind_info_object::frame_id, value::frame_id, unwind_info_object::pending_frame, unwind_info_object_type, and VEC_alloc.
Referenced by pending_framepy_create_unwind_info().
|
static |
Definition at line 613 of file py-unwind.c.
References TRACE_PY_UNWIND, and xfree().
Referenced by pyuw_on_new_gdbarch().
|
static |
Definition at line 626 of file py-unwind.c.
References GDBARCH_OBSTACK_ZALLOC.
Referenced by gdbpy_initialize_unwind().
|
static |
Definition at line 172 of file py-unwind.c.
References _, PyObject_GetAttrString, PyObject_HasAttrString, and pyuw_value_obj_to_pointer().
Referenced by pending_framepy_create_unwind_info().
|
static |
Definition at line 635 of file py-unwind.c.
References frame_unwind::dealloc_cache, default_frame_unwind_stop_reason(), frame_unwind_prepend_unwinder(), gdbarch_data(), GDBARCH_OBSTACK_ZALLOC, NORMAL_FRAME, frame_unwind::prev_register, pyuw_dealloc_cache(), pyuw_prev_register(), pyuw_sniffer(), pyuw_this_id(), frame_unwind::sniffer, frame_unwind::stop_reason, frame_unwind::this_id, frame_unwind::type, frame_unwind::unwind_data, and pyuw_gdbarch_data_type::unwinder_registered.
Referenced by gdbpy_initialize_unwind().
|
static |
Definition at line 112 of file py-unwind.c.
References gdb_py_int_as_long(), gdbpy_is_string(), gdbpy_obj_to_string(), int, user_reg_map_name_to_regnum(), and user_reg_map_regnum_to_name().
Referenced by pending_framepy_read_register(), and unwind_infopy_add_saved_register().
|
static |
Definition at line 498 of file py-unwind.c.
References reg_info::data, frame_unwind_got_bytes(), frame_unwind_got_optimized(), reg_info::number, cached_frame_info::reg, cached_frame_info::reg_count, and TRACE_PY_UNWIND.
Referenced by pyuw_on_new_gdbarch().
|
static |
Definition at line 519 of file py-unwind.c.
References _, current_language, reg_info::data, do_cleanups(), ensure_python_env(), error(), unwind_info_object::frame_id, cached_frame_info::frame_id, gdb_assert, gdb_python_module, cached_frame_info::gdbarch, gdbpy_print_stack(), get_frame_pc(), get_frame_sp(), make_cleanup(), make_cleanup_py_decref(), MAX_REGISTER_SIZE, saved_reg::number, reg_info::number, paddress(), pending_frame_invalidate(), pending_frame_object_type, PyObject_GetAttrString, PyObject_HasAttrString, cached_frame_info::reg, cached_frame_info::reg_count, register_size(), TRACE_PY_UNWIND, TYPE_LENGTH, unwind_info_object_type, saved_reg::value, value_contents(), value_object_to_value(), value_type(), VEC_iterate, VEC_length, and xmalloc().
Referenced by pyuw_on_new_gdbarch().
|
static |
Definition at line 483 of file py-unwind.c.
References fprint_frame_id(), fprintf_unfiltered(), gdb_stdlog, and pyuw_debug.
Referenced by pyuw_on_new_gdbarch().
Definition at line 143 of file py-unwind.c.
References CATCH, END_CATCH, gdbpy_convert_exception(), RETURN_MASK_ALL, TRY, unpack_pointer(), value_contents(), value_object_to_value(), and value_type().
Referenced by pyuw_object_attribute_to_pointer().
|
static |
Definition at line 281 of file py-unwind.c.
References pending_frame_object::frame_info, pending_frame_object::gdbarch, saved_reg::number, unwind_info_object::pending_frame, Py_DECREF, pyuw_parse_register_id(), register_size(), regnum, TYPE_LENGTH, saved_reg::value, value_object_to_value(), value_type(), VEC_iterate, and VEC_safe_push.
|
static |
Definition at line 352 of file py-unwind.c.
References unwind_info_object::pending_frame, Py_DECREF, Py_TYPE, saved_reg::value, VEC_free, and VEC_iterate.
|
static |
Definition at line 200 of file py-unwind.c.
References CATCH, END_CATCH, fprint_frame_id(), fprintf_unfiltered(), unwind_info_object::frame_id, GDB_PY_HANDLE_EXCEPTION, get_user_print_options(), mem_fileopen(), unwind_info_object::pending_frame, RETURN_MASK_ALL, TRY, ui_file_delete(), ui_file_xstrdup(), value_object_to_value(), value_print(), VEC_iterate, and xfree().
|
static |
Definition at line 688 of file py-unwind.c.
PyTypeObject pending_frame_object_type |
Definition at line 701 of file py-unwind.c.
Referenced by gdbpy_initialize_unwind(), and pyuw_sniffer().
|
static |
Definition at line 104 of file py-unwind.c.
Referenced by gdbpy_initialize_unwind(), and pyuw_this_id().
|
static |
Definition at line 106 of file py-unwind.c.
|
static |
Definition at line 742 of file py-unwind.c.
PyTypeObject unwind_info_object_type |
Definition at line 751 of file py-unwind.c.
Referenced by gdbpy_initialize_unwind(), pyuw_create_unwind_info(), and pyuw_sniffer().