GDB (xrefs)
|
#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"
Go to the source code of this file.
Enumerations | |
enum | string_repr_result { STRING_REPR_NONE, STRING_REPR_ERROR, STRING_REPR_OK, string_repr_none, string_repr_error, string_repr_ok } |
Functions | |
static PyObject * | search_pp_list (PyObject *list, PyObject *value) |
static PyObject * | find_pretty_printer_from_objfiles (PyObject *value) |
static PyObject * | find_pretty_printer_from_progspace (PyObject *value) |
static PyObject * | find_pretty_printer_from_gdb (PyObject *value) |
static PyObject * | find_pretty_printer (PyObject *value) |
static PyObject * | pretty_print_one_value (PyObject *printer, struct value **out_value) |
char * | gdbpy_get_display_hint (PyObject *printer) |
static void | print_stack_unless_memory_error (struct ui_file *stream) |
static enum 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 | py_restore_tstate (void *p) |
static PyObject * | push_dummy_python_frame (void) |
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 type *type, const gdb_byte *valaddr, int embedded_offset, CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, const struct language_defn *language) |
PyObject * | apply_varobj_pretty_printer (PyObject *printer_obj, struct value **replacement, struct ui_file *stream) |
PyObject * | gdbpy_get_varobj_pretty_printer (struct value *value) |
PyObject * | gdbpy_default_visualizer (PyObject *self, PyObject *args) |
enum string_repr_result |
Enumerator | |
---|---|
STRING_REPR_NONE | |
STRING_REPR_ERROR | |
STRING_REPR_OK | |
string_repr_none | |
string_repr_error | |
string_repr_ok |
Definition at line 31 of file py-prettyprint.c.
PyObject* apply_varobj_pretty_printer | ( | PyObject * | printer_obj, |
struct value ** | replacement, | ||
struct ui_file * | stream | ||
) |
Definition at line 799 of file py-prettyprint.c.
References pretty_print_one_value(), and print_stack_unless_memory_error().
Referenced by varobj_value_get_print_value().
|
static |
Definition at line 183 of file py-prettyprint.c.
References find_pretty_printer_from_gdb(), find_pretty_printer_from_objfiles(), find_pretty_printer_from_progspace(), and Py_DECREF.
Referenced by gdbpy_apply_val_pretty_printer(), gdbpy_default_visualizer(), and gdbpy_get_varobj_pretty_printer().
|
static |
Definition at line 157 of file py-prettyprint.c.
References gdb_python_module, PyObject_GetAttrString, PyObject_HasAttrString, and search_pp_list().
Referenced by find_pretty_printer().
|
static |
Definition at line 96 of file py-prettyprint.c.
References ALL_OBJFILES, objfile_to_objfile_object(), objfpy_get_printers(), Py_DECREF, and search_pp_list().
Referenced by find_pretty_printer().
|
static |
Definition at line 136 of file py-prettyprint.c.
References current_program_space, pspace_to_pspace_object(), pspy_get_printers(), and search_pp_list().
Referenced by find_pretty_printer().
enum ext_lang_rc gdbpy_apply_val_pretty_printer | ( | const struct extension_language_defn * | extlang, |
struct type * | type, | ||
const gdb_byte * | valaddr, | ||
int | embedded_offset, | ||
CORE_ADDR | address, | ||
struct ui_file * | stream, | ||
int | recurse, | ||
const struct value * | val, | ||
const struct value_print_options * | options, | ||
const struct language_defn * | language | ||
) |
Definition at line 704 of file py-prettyprint.c.
References do_cleanups(), ensure_python_env(), EXT_LANG_RC_ERROR, EXT_LANG_RC_NOP, EXT_LANG_RC_OK, find_pretty_printer(), free_current_contents(), gdb_python_initialized, gdbpy_get_display_hint(), get_type_arch(), lval_computed, lval_internalvar, lval_internalvar_component, make_cleanup(), make_cleanup_py_decref(), print_children(), print_stack_unless_memory_error(), print_string_repr(), Py_DECREF, set_value_address(), set_value_component_location(), string_repr_error, string_repr_none, TYPE_LENGTH, value_bytes_available(), value_from_contents_and_address(), VALUE_LVAL, and value_to_value_object().
PyObject* gdbpy_default_visualizer | ( | PyObject * | self, |
PyObject * | args | ||
) |
Definition at line 848 of file py-prettyprint.c.
References _, find_pretty_printer(), and value_object_to_value().
char* gdbpy_get_display_hint | ( | PyObject * | printer | ) |
Definition at line 248 of file py-prettyprint.c.
References gdbpy_display_hint_cst, gdbpy_is_string(), gdbpy_print_stack(), Py_DECREF, and python_string_to_host_string().
Referenced by gdbpy_apply_val_pretty_printer(), varobj_get_display_hint(), and varobj_value_get_print_value().
PyObject* gdbpy_get_varobj_pretty_printer | ( | struct value * | value | ) |
Definition at line 819 of file py-prettyprint.c.
References CATCH, END_CATCH, find_pretty_printer(), GDB_PY_HANDLE_EXCEPTION, Py_DECREF, RETURN_MASK_ALL, TRY, value_copy(), and value_to_value_object().
Referenced by install_default_visualizer().
|
static |
Definition at line 214 of file py-prettyprint.c.
References CATCH, convert_value_from_python(), END_CATCH, gdbpy_is_lazy_string(), gdbpy_is_string(), gdbpy_to_string_cst, Py_DECREF, RETURN_MASK_ALL, and TRY.
Referenced by apply_varobj_pretty_printer(), and print_string_repr().
|
static |
Definition at line 474 of file py-prettyprint.c.
References _, value_print_options::addressprint, common_val_print(), convert_value_from_python(), do_cleanups(), encoding, error(), fprintf_filtered(), fprintf_unfiltered(), fputs_filtered(), free_current_contents(), gdb_stderr, gdbpy_children_cst, gdbpy_extract_lazy_string(), gdbpy_is_lazy_string(), gdbpy_is_string(), gdbpy_print_python_errors_p(), gdbpy_print_stack(), type::length, make_cleanup(), make_cleanup_py_decref(), n_spaces(), name, value_print_options::prettyformat, value_print_options::prettyformat_arrays, value_print_options::prettyformat_structs, value_print_options::print_array_indexes, value_print_options::print_max, print_spaces_filtered(), print_stack_unless_memory_error(), push_dummy_python_frame(), Py_DECREF, python_string_to_host_string(), value_print_options::summary, type, Val_prettyformat, val_print_string(), wrap_here(), and xfree().
Referenced by gdbpy_apply_val_pretty_printer().
|
static |
Definition at line 276 of file py-prettyprint.c.
References _, do_cleanups(), fprintf_filtered(), gdbpy_exception_to_string(), gdbpy_gdb_memory_error, gdbpy_print_stack(), make_cleanup(), make_cleanup_py_decref(), type, and xfree().
Referenced by apply_varobj_pretty_printer(), gdbpy_apply_val_pretty_printer(), print_children(), and print_string_repr().
|
static |
Definition at line 307 of file py-prettyprint.c.
References value_print_options::addressprint, builtin_type::builtin_char, builtin_type(), common_val_print(), do_cleanups(), encoding, fputs_filtered(), free_current_contents(), gdbpy_extract_lazy_string(), gdbpy_is_lazy_string(), LA_PRINT_STRING, make_cleanup(), make_cleanup_py_decref(), pretty_print_one_value(), print_stack_unless_memory_error(), python_string_to_target_python_string(), string, string_repr_error, string_repr_none, string_repr_ok, type, and val_print_string().
Referenced by gdbpy_apply_val_pretty_printer().
|
static |
Definition at line 405 of file py-prettyprint.c.
References code, make_cleanup(), Py_DECREF, and py_restore_tstate().
Referenced by print_children().
|
static |
Definition at line 394 of file py-prettyprint.c.
Referenced by push_dummy_python_frame().
|
static |
Definition at line 48 of file py-prettyprint.c.
References gdbpy_enabled_cst, and Py_DECREF.
Referenced by find_pretty_printer_from_gdb(), find_pretty_printer_from_objfiles(), and find_pretty_printer_from_progspace().