GDB (xrefs)
Loading...
Searching...
No Matches
Enumerations | Functions | Variables
py-prettyprint.c File Reference
#include "defs.h"
#include "objfiles.h"
#include "symtab.h"
#include "language.h"
#include "valprint.h"
#include "extension-priv.h"
#include "python.h"
#include "python-internal.h"
#include "cli/cli-style.h"

Go to the source code of this file.

Enumerations

enum  gdbpy_string_repr_result { string_repr_none , string_repr_error , string_repr_ok }
 

Functions

static gdbpy_ref search_pp_list (PyObject *list, PyObject *value)
 
static PyObjectfind_pretty_printer_from_objfiles (PyObject *value)
 
static gdbpy_ref find_pretty_printer_from_progspace (PyObject *value)
 
static gdbpy_ref find_pretty_printer_from_gdb (PyObject *value)
 
static gdbpy_ref find_pretty_printer (PyObject *value)
 
static gdbpy_ref pretty_print_one_value (PyObject *printer, struct value **out_value)
 
gdb::unique_xmalloc_ptr< char > gdbpy_get_display_hint (PyObject *printer)
 
static void print_stack_unless_memory_error (struct ui_file *stream)
 
static enum gdbpy_string_repr_result print_string_repr (PyObject *printer, const char *hint, struct ui_file *stream, int recurse, const struct value_print_options *options, const struct language_defn *language, struct gdbarch *gdbarch)
 
static void print_children (PyObject *printer, const char *hint, struct ui_file *stream, int recurse, const struct value_print_options *options, const struct language_defn *language, int is_py_none)
 
enum ext_lang_rc gdbpy_apply_val_pretty_printer (const struct extension_language_defn *extlang, struct value *value, struct ui_file *stream, int recurse, const struct value_print_options *options, const struct language_defn *language)
 
gdbpy_ref apply_varobj_pretty_printer (PyObject *printer_obj, struct value **replacement, struct ui_file *stream, const value_print_options *opts)
 
gdbpy_ref gdbpy_get_varobj_pretty_printer (struct value *value)
 
PyObjectgdbpy_default_visualizer (PyObject *self, PyObject *args)
 
static int set_boolean (PyObject *dict, const char *name, bool val)
 
static int set_unsigned (PyObject *dict, const char *name, unsigned int val)
 
PyObjectgdbpy_print_options (PyObject *unused1, PyObject *unused2)
 
void gdbpy_get_print_options (value_print_options *opts)
 

Variables

const struct value_print_optionsgdbpy_current_print_options
 

Enumeration Type Documentation

◆ gdbpy_string_repr_result

Enumerator
string_repr_none 
string_repr_error 
string_repr_ok 

Definition at line 32 of file py-prettyprint.c.

Function Documentation

◆ apply_varobj_pretty_printer()

gdbpy_ref apply_varobj_pretty_printer ( PyObject printer_obj,
struct value **  replacement,
struct ui_file stream,
const value_print_options opts 
)

◆ find_pretty_printer()

static gdbpy_ref find_pretty_printer ( PyObject value)
static

◆ find_pretty_printer_from_gdb()

static gdbpy_ref find_pretty_printer_from_gdb ( PyObject value)
static

Definition at line 148 of file py-prettyprint.c.

References gdb_python_module, and search_pp_list().

Referenced by find_pretty_printer().

◆ find_pretty_printer_from_objfiles()

static PyObject * find_pretty_printer_from_objfiles ( PyObject value)
static

◆ find_pretty_printer_from_progspace()

static gdbpy_ref find_pretty_printer_from_progspace ( PyObject value)
static

◆ gdbpy_apply_val_pretty_printer()

enum ext_lang_rc gdbpy_apply_val_pretty_printer ( const struct extension_language_defn extlang,
struct value value,
struct ui_file stream,
int  recurse,
const struct value_print_options options,
const struct language_defn language 
)

◆ gdbpy_default_visualizer()

PyObject * gdbpy_default_visualizer ( PyObject self,
PyObject args 
)

Definition at line 685 of file py-prettyprint.c.

References find_pretty_printer(), and value_object_to_value().

◆ gdbpy_get_display_hint()

gdb::unique_xmalloc_ptr< char > gdbpy_get_display_hint ( PyObject printer)

◆ gdbpy_get_print_options()

void gdbpy_get_print_options ( value_print_options opts)

◆ gdbpy_get_varobj_pretty_printer()

gdbpy_ref gdbpy_get_varobj_pretty_printer ( struct value value)

◆ gdbpy_print_options()

PyObject * gdbpy_print_options ( PyObject unused1,
PyObject unused2 
)

◆ pretty_print_one_value()

static gdbpy_ref pretty_print_one_value ( PyObject printer,
struct value **  out_value 
)
static

◆ print_children()

static void print_children ( PyObject printer,
const char *  hint,
struct ui_file stream,
int  recurse,
const struct value_print_options options,
const struct language_defn language,
int  is_py_none 
)
static

◆ print_stack_unless_memory_error()

static void print_stack_unless_memory_error ( struct ui_file stream)
static

◆ print_string_repr()

static enum gdbpy_string_repr_result print_string_repr ( PyObject printer,
const char *  hint,
struct ui_file stream,
int  recurse,
const struct value_print_options options,
const struct language_defn language,
struct gdbarch gdbarch 
)
static

◆ search_pp_list()

static gdbpy_ref search_pp_list ( PyObject list,
PyObject value 
)
static

◆ set_boolean()

static int set_boolean ( PyObject dict,
const char *  name,
bool  val 
)
static

Definition at line 705 of file py-prettyprint.c.

References name.

Referenced by gdbpy_print_options().

◆ set_unsigned()

static int set_unsigned ( PyObject dict,
const char *  name,
unsigned int  val 
)
static

Definition at line 715 of file py-prettyprint.c.

References gdb_py_object_from_ulongest(), and name.

Referenced by gdbpy_print_options().

Variable Documentation

◆ gdbpy_current_print_options

const struct value_print_options* gdbpy_current_print_options