GDB (xrefs)
|
#include "defs.h"
#include "objfiles.h"
#include "symtab.h"
#include "language.h"
#include "exceptions.h"
#include "arch-utils.h"
#include "python.h"
#include "ui-out.h"
#include "valprint.h"
#include "annotate.h"
#include "hashtab.h"
#include "demangle.h"
#include "mi/mi-cmds.h"
#include "python-internal.h"
Go to the source code of this file.
Enumerations | |
enum | mi_print_types { MI_PRINT_ARGS, MI_PRINT_LOCALS } |
Functions | |
static enum py_bt_status | extract_sym (PyObject *obj, char **name, struct symbol **sym, const struct language_defn **language) |
static enum py_bt_status | extract_value (PyObject *obj, struct value **value) |
static int | mi_should_print (struct symbol *sym, enum mi_print_types type) |
static enum py_bt_status | py_print_type (struct ui_out *out, struct value *val) |
static enum py_bt_status | py_print_value (struct ui_out *out, struct value *val, const struct value_print_options *opts, int indent, enum py_frame_args args_type, const struct language_defn *language) |
static PyObject * | get_py_iter_from_func (PyObject *filter, char *func) |
static enum py_bt_status | py_print_single_arg (struct ui_out *out, const char *sym_name, struct frame_arg *fa, struct value *fv, const struct value_print_options *opts, enum py_frame_args args_type, int print_args_field, const struct language_defn *language) |
static enum py_bt_status | enumerate_args (PyObject *iter, struct ui_out *out, enum py_frame_args args_type, int print_args_field, struct frame_info *frame) |
static enum py_bt_status | enumerate_locals (PyObject *iter, struct ui_out *out, int indent, enum py_frame_args args_type, int print_args_field, struct frame_info *frame) |
static enum py_bt_status | py_mi_print_variables (PyObject *filter, struct ui_out *out, struct value_print_options *opts, enum py_frame_args args_type, struct frame_info *frame) |
static enum py_bt_status | py_print_locals (PyObject *filter, struct ui_out *out, enum py_frame_args args_type, int indent, struct frame_info *frame) |
static enum py_bt_status | py_print_args (PyObject *filter, struct ui_out *out, enum py_frame_args args_type, struct frame_info *frame) |
static enum py_bt_status | py_print_frame (PyObject *filter, int flags, enum py_frame_args args_type, struct ui_out *out, int indent, htab_t levels_printed) |
static PyObject * | bootstrap_python_frame_filters (struct frame_info *frame, int frame_low, int frame_high) |
enum py_bt_status | apply_frame_filter (struct frame_info *frame, int flags, enum py_frame_args args_type, struct ui_out *out, int frame_low, int frame_high) |
enum mi_print_types |
Definition at line 35 of file py-framefilter.c.
enum py_bt_status apply_frame_filter | ( | struct frame_info * | frame, |
int | flags, | ||
enum py_frame_args | args_type, | ||
struct ui_out * | out, | ||
int | frame_low, | ||
int | frame_high | ||
) |
Definition at line 1463 of file py-framefilter.c.
Referenced by backtrace_command_1(), mi_cmd_stack_list_args(), mi_cmd_stack_list_frames(), mi_cmd_stack_list_locals(), and mi_cmd_stack_list_variables().
static PyObject* bootstrap_python_frame_filters | ( | struct frame_info * | frame, |
int | frame_low, | ||
int | frame_high | ||
) | [static] |
Definition at line 1388 of file py-framefilter.c.
References do_cleanups(), error(), frame_info_to_frame_object(), make_cleanup(), make_cleanup_py_decref(), null_cleanup(), and Py_DECREF.
Referenced by apply_frame_filter().
static enum py_bt_status enumerate_args | ( | PyObject * | iter, |
struct ui_out * | out, | ||
enum py_frame_args | args_type, | ||
int | print_args_field, | ||
struct frame_info * | frame | ||
) | [static] |
Definition at line 492 of file py-framefilter.c.
References _, annotate_arg_end(), annotate_frame_args(), CLI_SCALAR_VALUES, value_print_options::deref_ref, frame_arg::entry_kind, error(), frame_arg::error, extract_sym(), extract_value(), gdbpy_convert_exception(), get_user_print_options(), MI_PRINT_ARGS, mi_should_print(), print_entry_values_no, print_entry_values_only, PY_BT_ERROR, PY_BT_OK, Py_DECREF, py_print_single_arg(), read_frame_arg(), gdb_exception::reason, RETURN_MASK_ALL, value_print_options::summary, TRY_CATCH, ui_out_is_mi_like_p(), ui_out_text(), ui_out_wrap_hint(), and xfree().
Referenced by py_mi_print_variables(), and py_print_args().
static enum py_bt_status enumerate_locals | ( | PyObject * | iter, |
struct ui_out * | out, | ||
int | indent, | ||
enum py_frame_args | args_type, | ||
int | print_args_field, | ||
struct frame_info * | frame | ||
) | [static] |
Definition at line 710 of file py-framefilter.c.
References value_print_options::deref_ref, do_cleanups(), error(), extract_sym(), extract_value(), gdbpy_convert_exception(), get_user_print_options(), make_cleanup(), make_cleanup_py_decref(), make_cleanup_ui_out_tuple_begin_end(), MI_PRINT_LOCALS, MI_PRINT_SIMPLE_VALUES, mi_should_print(), NO_VALUES, PY_BT_ERROR, PY_BT_OK, py_print_type(), py_print_value(), read_var_value(), gdb_exception::reason, RETURN_MASK_ALL, TRY_CATCH, ui_out_field_string(), ui_out_is_mi_like_p(), ui_out_spaces(), ui_out_text(), and xfree().
Referenced by py_mi_print_variables(), and py_print_locals().
static enum py_bt_status extract_sym | ( | PyObject * | obj, |
char ** | name, | ||
struct symbol ** | sym, | ||
const struct language_defn ** | language | ||
) | [static] |
Definition at line 55 of file py-framefilter.c.
References _, current_language, gdbpy_is_string(), language_def(), language_mode_auto, PY_BT_ERROR, PY_BT_OK, Py_DECREF, python_language, python_string_to_host_string(), SYMBOL_LANGUAGE, symbol_object_to_symbol(), and SYMBOL_PRINT_NAME.
Referenced by enumerate_args(), and enumerate_locals().
static enum py_bt_status extract_value | ( | PyObject * | obj, |
struct value ** | value | ||
) | [static] |
Definition at line 122 of file py-framefilter.c.
References convert_value_from_python(), PY_BT_ERROR, PY_BT_OK, and Py_DECREF.
Referenced by enumerate_args(), and enumerate_locals().
static PyObject* get_py_iter_from_func | ( | PyObject * | filter, |
char * | func | ||
) | [static] |
Definition at line 313 of file py-framefilter.c.
References Py_DECREF.
Referenced by py_mi_print_variables(), py_print_args(), py_print_frame(), and py_print_locals().
static int mi_should_print | ( | struct symbol * | sym, |
enum mi_print_types | type | ||
) | [static] |
Definition at line 162 of file py-framefilter.c.
References LOC_ARG, LOC_BLOCK, LOC_COMPUTED, LOC_CONST, LOC_CONST_BYTES, LOC_LABEL, LOC_LOCAL, LOC_OPTIMIZED_OUT, LOC_REF_ARG, LOC_REGISTER, LOC_REGPARM_ADDR, LOC_STATIC, LOC_TYPEDEF, LOC_UNDEF, LOC_UNRESOLVED, MI_PRINT_LOCALS, SYMBOL_CLASS, and SYMBOL_IS_ARGUMENT.
Referenced by enumerate_args(), and enumerate_locals().
static enum py_bt_status py_mi_print_variables | ( | PyObject * | filter, |
struct ui_out * | out, | ||
struct value_print_options * | opts, | ||
enum py_frame_args | args_type, | ||
struct frame_info * | frame | ||
) | [static] |
Definition at line 863 of file py-framefilter.c.
References do_cleanups(), enumerate_args(), enumerate_locals(), error(), get_py_iter_from_func(), make_cleanup_py_decref(), make_cleanup_py_xdecref(), make_cleanup_ui_out_list_begin_end(), PY_BT_ERROR, and PY_BT_OK.
Referenced by py_print_frame().
static enum py_bt_status py_print_args | ( | PyObject * | filter, |
struct ui_out * | out, | ||
enum py_frame_args | args_type, | ||
struct frame_info * | frame | ||
) | [static] |
Definition at line 940 of file py-framefilter.c.
References annotate_frame_args(), do_cleanups(), enumerate_args(), gdbpy_convert_exception(), get_py_iter_from_func(), make_cleanup_py_xdecref(), make_cleanup_ui_out_list_begin_end(), PY_BT_ERROR, PY_BT_OK, gdb_exception::reason, RETURN_MASK_ALL, TRY_CATCH, ui_out_is_mi_like_p(), and ui_out_text().
Referenced by py_print_frame().
static enum py_bt_status py_print_frame | ( | PyObject * | filter, |
int | flags, | ||
enum py_frame_args | args_type, | ||
struct ui_out * | out, | ||
int | indent, | ||
htab_t | levels_printed | ||
) | [static] |
Definition at line 1005 of file py-framefilter.c.
References _, frame_info::addr, value_print_options::addressprint, annotate_frame_address(), annotate_frame_address_end(), annotate_frame_begin(), annotate_frame_end(), annotate_frame_function_name(), annotate_frame_source_begin(), annotate_frame_source_file(), annotate_frame_source_file_end(), annotate_frame_source_line(), do_cleanups(), error(), frame_object_to_frame_info(), frame_relative_level(), gdbpy_convert_exception(), gdbpy_is_string(), get_frame_arch(), get_py_iter_from_func(), get_user_print_options(), frame_info::level, line, lookup_minimal_symbol_by_pc(), make_cleanup(), make_cleanup_py_decref(), make_cleanup_ui_out_list_begin_end(), make_cleanup_ui_out_tuple_begin_end(), bound_minimal_symbol::minsym, null_cleanup(), PRINT_ARGS, PRINT_FRAME_INFO, print_frame_info(), PRINT_LEVEL, PRINT_LOCALS, PY_BT_COMPLETED, PY_BT_ERROR, Py_DECREF, py_mi_print_variables(), py_print_args(), py_print_locals(), python_string_to_host_string(), gdb_exception::reason, RETURN_MASK_ALL, SYMBOL_PRINT_NAME, TRY_CATCH, ui_left, ui_out_field_core_addr(), ui_out_field_fmt_int(), ui_out_field_int(), ui_out_field_skip(), ui_out_field_string(), ui_out_is_mi_like_p(), ui_out_spaces(), ui_out_text(), ui_out_wrap_hint(), and xfree().
Referenced by apply_frame_filter().
static enum py_bt_status py_print_locals | ( | PyObject * | filter, |
struct ui_out * | out, | ||
enum py_frame_args | args_type, | ||
int | indent, | ||
struct frame_info * | frame | ||
) | [static] |
Definition at line 906 of file py-framefilter.c.
References do_cleanups(), enumerate_locals(), get_py_iter_from_func(), make_cleanup_py_xdecref(), make_cleanup_ui_out_list_begin_end(), PY_BT_ERROR, and PY_BT_OK.
Referenced by py_print_frame().
static enum py_bt_status py_print_single_arg | ( | struct ui_out * | out, |
const char * | sym_name, | ||
struct frame_arg * | fa, | ||
struct value * | fv, | ||
const struct value_print_options * | opts, | ||
enum py_frame_args | args_type, | ||
int | print_args_field, | ||
const struct language_defn * | language | ||
) | [static] |
Definition at line 357 of file py-framefilter.c.
References annotate_arg_begin(), annotate_arg_name_end(), annotate_arg_value(), do_cleanups(), frame_arg::entry_kind, error(), fprintf_symbol_filtered(), fputs_filtered(), gdbpy_convert_exception(), language_def(), make_cleanup(), make_cleanup_ui_file_delete(), make_cleanup_ui_out_tuple_begin_end(), mem_fileopen(), MI_PRINT_SIMPLE_VALUES, NO_VALUES, null_cleanup(), print_entry_values_compact, print_entry_values_only, PY_BT_ERROR, PY_BT_OK, py_print_type(), py_print_value(), gdb_exception::reason, RETURN_MASK_ALL, frame_arg::sym, SYMBOL_LANGUAGE, SYMBOL_PRINT_NAME, TRY_CATCH, ui_out_field_int(), ui_out_field_stream(), ui_out_field_string(), ui_out_is_mi_like_p(), ui_out_text(), frame_arg::val, and value_type().
Referenced by enumerate_args().
static enum py_bt_status py_print_type | ( | struct ui_out * | out, |
struct value * | val | ||
) | [static] |
Definition at line 203 of file py-framefilter.c.
References check_typedef(), do_cleanups(), gdbpy_convert_exception(), make_cleanup_ui_file_delete(), mem_fileopen(), PY_BT_ERROR, PY_BT_OK, gdb_exception::reason, RETURN_MASK_ALL, TRY_CATCH, type, type_print(), ui_out_field_stream(), and value_type().
Referenced by enumerate_locals(), and py_print_single_arg().
static enum py_bt_status py_print_value | ( | struct ui_out * | out, |
struct value * | val, | ||
const struct value_print_options * | opts, | ||
int | indent, | ||
enum py_frame_args | args_type, | ||
const struct language_defn * | language | ||
) | [static] |
Definition at line 239 of file py-framefilter.c.
References check_typedef(), common_val_print(), do_cleanups(), gdbpy_convert_exception(), make_cleanup_ui_file_delete(), mem_fileopen(), MI_PRINT_ALL_VALUES, MI_PRINT_SIMPLE_VALUES, NO_VALUES, PY_BT_ERROR, PY_BT_OK, gdb_exception::reason, RETURN_MASK_ALL, TRY_CATCH, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_STRUCT, TYPE_CODE_UNION, ui_out_field_stream(), ui_out_is_mi_like_p(), and value_type().
Referenced by enumerate_locals(), and py_print_single_arg().