GDB (xrefs)
Loading...
Searching...
No Matches
Enumerations | Functions
py-framefilter.c File Reference
#include "defs.h"
#include "objfiles.h"
#include "symtab.h"
#include "language.h"
#include "arch-utils.h"
#include "python.h"
#include "ui-out.h"
#include "valprint.h"
#include "stack.h"
#include "source.h"
#include "annotate.h"
#include "hashtab.h"
#include "demangle.h"
#include "mi/mi-cmds.h"
#include "python-internal.h"
#include "gdbsupport/gdb_optional.h"
#include "cli/cli-style.h"

Go to the source code of this file.

Enumerations

enum  mi_print_types { MI_PRINT_ARGS , MI_PRINT_LOCALS }
 

Functions

static enum ext_lang_bt_status extract_sym (PyObject *obj, gdb::unique_xmalloc_ptr< char > *name, struct symbol **sym, const struct block **sym_block, const struct language_defn **language)
 
static enum ext_lang_bt_status extract_value (PyObject *obj, struct value **value)
 
static int mi_should_print (struct symbol *sym, enum mi_print_types type)
 
static void py_print_type (struct ui_out *out, struct value *val)
 
static void py_print_value (struct ui_out *out, struct value *val, const struct value_print_options *opts, int indent, enum ext_lang_frame_args args_type, const struct language_defn *language)
 
static PyObjectget_py_iter_from_func (PyObject *filter, const char *func)
 
static void 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 ext_lang_frame_args args_type, int print_args_field, const struct language_defn *language)
 
static enum ext_lang_bt_status enumerate_args (PyObject *iter, struct ui_out *out, enum ext_lang_frame_args args_type, int print_args_field, frame_info_ptr frame)
 
static enum ext_lang_bt_status enumerate_locals (PyObject *iter, struct ui_out *out, int indent, enum ext_lang_frame_args args_type, int print_args_field, frame_info_ptr frame)
 
static enum ext_lang_bt_status py_mi_print_variables (PyObject *filter, struct ui_out *out, struct value_print_options *opts, enum ext_lang_frame_args args_type, frame_info_ptr frame)
 
static enum ext_lang_bt_status py_print_locals (PyObject *filter, struct ui_out *out, enum ext_lang_frame_args args_type, int indent, frame_info_ptr frame)
 
static enum ext_lang_bt_status py_print_args (PyObject *filter, struct ui_out *out, enum ext_lang_frame_args args_type, frame_info_ptr frame)
 
static enum ext_lang_bt_status py_print_frame (PyObject *filter, frame_filter_flags flags, enum ext_lang_frame_args args_type, struct ui_out *out, int indent, htab_t levels_printed)
 
static PyObjectbootstrap_python_frame_filters (frame_info_ptr frame, int frame_low, int frame_high)
 
enum ext_lang_bt_status gdbpy_apply_frame_filter (const struct extension_language_defn *extlang, frame_info_ptr frame, frame_filter_flags flags, enum ext_lang_frame_args args_type, struct ui_out *out, int frame_low, int frame_high)
 

Enumeration Type Documentation

◆ mi_print_types

Enumerator
MI_PRINT_ARGS 
MI_PRINT_LOCALS 

Definition at line 38 of file py-framefilter.c.

Function Documentation

◆ bootstrap_python_frame_filters()

static PyObject * bootstrap_python_frame_filters ( frame_info_ptr frame,
int frame_low,
int frame_high )
static

◆ enumerate_args()

static enum ext_lang_bt_status enumerate_args ( PyObject * iter,
struct ui_out * out,
enum ext_lang_frame_args args_type,
int print_args_field,
frame_info_ptr frame )
static

◆ enumerate_locals()

static enum ext_lang_bt_status enumerate_locals ( PyObject * iter,
struct ui_out * out,
int indent,
enum ext_lang_frame_args args_type,
int print_args_field,
frame_info_ptr frame )
static

◆ extract_sym()

static enum ext_lang_bt_status extract_sym ( PyObject * obj,
gdb::unique_xmalloc_ptr< char > * name,
struct symbol ** sym,
const struct block ** sym_block,
const struct language_defn ** language )
static

◆ extract_value()

static enum ext_lang_bt_status extract_value ( PyObject * obj,
struct value ** value )
static

◆ gdbpy_apply_frame_filter()

enum ext_lang_bt_status gdbpy_apply_frame_filter ( const struct extension_language_defn * extlang,
frame_info_ptr frame,
frame_filter_flags flags,
enum ext_lang_frame_args args_type,
struct ui_out * out,
int frame_low,
int frame_high )

◆ get_py_iter_from_func()

static PyObject * get_py_iter_from_func ( PyObject * filter,
const char * func )
static

Definition at line 264 of file py-framefilter.c.

References func, and PyObject_CallMethod.

Referenced by py_mi_print_variables(), py_print_args(), py_print_frame(), and py_print_locals().

◆ mi_should_print()

static int mi_should_print ( struct symbol * sym,
enum mi_print_types type )
static

◆ py_mi_print_variables()

static enum ext_lang_bt_status py_mi_print_variables ( PyObject * filter,
struct ui_out * out,
struct value_print_options * opts,
enum ext_lang_frame_args args_type,
frame_info_ptr frame )
static

◆ py_print_args()

static enum ext_lang_bt_status py_print_args ( PyObject * filter,
struct ui_out * out,
enum ext_lang_frame_args args_type,
frame_info_ptr frame )
static

◆ py_print_frame()

static enum ext_lang_bt_status py_print_frame ( PyObject * filter,
frame_filter_flags flags,
enum ext_lang_frame_args args_type,
struct ui_out * out,
int indent,
htab_t levels_printed )
static

Definition at line 746 of file py-framefilter.c.

References frame_info::addr, 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(), EXT_LANG_BT_ERROR, EXT_LANG_BT_OK, ui_out::field_core_addr(), ui_out::field_fmt_signed(), ui_out::field_signed(), ui_out::field_skip(), ui_out::field_string(), file_name_style, find_frame_sal(), flags, frame_object_to_frame_info(), frame_relative_level(), frame_show_address(), function_name_style, gdbarch_bfd_arch_info(), gdbpy_is_string(), frame_info_ptr::get(), get_addr_from_python(), get_frame_arch(), get_frame_pc_masked(), get_py_iter_from_func(), get_user_print_options(), get_user_print_what_frame_info(), ui_out::is_mi_like_p(), frame_info::level, symtab_and_line::line, LOC_AND_ADDRESS, LOCATION, lookup_minimal_symbol_by_pc(), bound_minimal_symbol::minsym, PRINT_ARGS, print_args(), PRINT_FRAME_INFO, print_frame_info(), PRINT_HIDE, PRINT_LEVEL, PRINT_LOCALS, general_symbol_info::print_name(), print_source_lines(), py_mi_print_variables(), py_print_args(), py_print_frame(), py_print_locals(), PyObject_CallMethod, python_string_to_host_string(), SHORT_LOCATION, ui_out::spaces(), SRC_AND_LOC, SRC_LINE, cli_style_option::style(), symtab_and_line::symtab, ui_out::text(), ui_left, and ui_out::wrap_hint().

Referenced by gdbpy_apply_frame_filter(), and py_print_frame().

◆ py_print_locals()

static enum ext_lang_bt_status py_print_locals ( PyObject * filter,
struct ui_out * out,
enum ext_lang_frame_args args_type,
int indent,
frame_info_ptr frame )
static

◆ py_print_single_arg()

static void 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 ext_lang_frame_args args_type,
int print_args_field,
const struct language_defn * language )
static

◆ py_print_type()

static void py_print_type ( struct ui_out * out,
struct value * val )
static

◆ py_print_value()

static void py_print_value ( struct ui_out * out,
struct value * val,
const struct value_print_options * opts,
int indent,
enum ext_lang_frame_args args_type,
const struct language_defn * language )
static