GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Enumerations | Functions | Variables
scm-pretty-print.c File Reference
#include "defs.h"
#include "top.h"
#include "charset.h"
#include "symtab.h"
#include "language.h"
#include "objfiles.h"
#include "value.h"
#include "valprint.h"
#include "guile-internal.h"

Go to the source code of this file.

Classes

struct  pretty_printer_smob
 
struct  pretty_printer_worker_smob
 

Enumerations

enum  guile_string_repr_result { STRING_REPR_NONE , STRING_REPR_ERROR , STRING_REPR_OK }
 
enum  display_hint {
  HINT_NONE , HINT_ERROR , HINT_ARRAY , HINT_MAP ,
  HINT_STRING
}
 

Functions

static int ppscm_print_pretty_printer_smob (SCM self, SCM port, scm_print_state *pstate)
 
static SCM gdbscm_make_pretty_printer (SCM name, SCM lookup)
 
static int ppscm_is_pretty_printer (SCM scm)
 
static SCM gdbscm_pretty_printer_p (SCM scm)
 
static SCM ppscm_get_pretty_printer_arg_unsafe (SCM self, int arg_pos, const char *func_name)
 
static pretty_printer_smobppscm_get_pretty_printer_smob_arg_unsafe (SCM self, int arg_pos, const char *func_name)
 
static SCM gdbscm_pretty_printer_enabled_p (SCM self)
 
static SCM gdbscm_set_pretty_printer_enabled_x (SCM self, SCM enabled)
 
static SCM gdbscm_pretty_printers (void)
 
static SCM gdbscm_set_pretty_printers_x (SCM printers)
 
static int ppscm_print_pretty_printer_worker_smob (SCM self, SCM port, scm_print_state *pstate)
 
static SCM gdbscm_make_pretty_printer_worker (SCM display_hint, SCM to_string, SCM children)
 
static int ppscm_is_pretty_printer_worker (SCM scm)
 
static SCM gdbscm_pretty_printer_worker_p (SCM scm)
 
static SCM ppscm_make_pp_type_error_exception (const char *message, SCM object)
 
static void ppscm_print_pp_type_error (const char *message, SCM object)
 
static SCM ppscm_search_pp_list (SCM list, SCM value)
 
static SCM ppscm_find_pretty_printer_from_objfiles (SCM value)
 
static SCM ppscm_find_pretty_printer_from_progspace (SCM value)
 
static SCM ppscm_find_pretty_printer_from_gdb (SCM value)
 
static SCM ppscm_find_pretty_printer (SCM value)
 
static SCM ppscm_pretty_print_one_value (SCM printer, struct value **out_value, struct gdbarch *gdbarch, const struct language_defn *language)
 
static SCM ppscm_get_display_hint_scm (SCM printer)
 
static enum display_hint ppscm_get_display_hint_enum (SCM printer)
 
static void ppscm_print_exception_unless_memory_error (SCM exception, struct ui_file *stream)
 
static enum guile_string_repr_result ppscm_print_string_repr (SCM printer, enum display_hint hint, struct ui_file *stream, int recurse, const struct value_print_options *options, struct gdbarch *gdbarch, const struct language_defn *language)
 
static void ppscm_print_children (SCM printer, enum display_hint hint, struct ui_file *stream, int recurse, const struct value_print_options *options, struct gdbarch *gdbarch, const struct language_defn *language, int printed_nothing)
 
enum ext_lang_rc gdbscm_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)
 
void gdbscm_initialize_pretty_printers (void)
 

Variables

static const char pretty_printer_smob_name []
 
static const char pretty_printer_worker_smob_name []
 
static scm_t_bits pretty_printer_smob_tag
 
static scm_t_bits pretty_printer_worker_smob_tag
 
static SCM pretty_printer_list
 
static SCM pp_type_error_symbol
 
static SCM ppscm_map_string
 
static SCM ppscm_array_string
 
static SCM ppscm_string_string
 
static const scheme_function pretty_printer_functions []
 

Enumeration Type Documentation

◆ display_hint

Enumerator
HINT_NONE 
HINT_ERROR 
HINT_ARRAY 
HINT_MAP 
HINT_STRING 

Definition at line 47 of file scm-pretty-print.c.

◆ guile_string_repr_result

Enumerator
STRING_REPR_NONE 
STRING_REPR_ERROR 
STRING_REPR_OK 

Definition at line 35 of file scm-pretty-print.c.

Function Documentation

◆ gdbscm_apply_val_pretty_printer()

enum ext_lang_rc gdbscm_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 )

◆ gdbscm_initialize_pretty_printers()

void gdbscm_initialize_pretty_printers ( void )

◆ gdbscm_make_pretty_printer()

static SCM gdbscm_make_pretty_printer ( SCM name,
SCM lookup )
static

◆ gdbscm_make_pretty_printer_worker()

static SCM gdbscm_make_pretty_printer_worker ( SCM display_hint,
SCM to_string,
SCM children )
static

◆ gdbscm_pretty_printer_enabled_p()

static SCM gdbscm_pretty_printer_enabled_p ( SCM self)
static

◆ gdbscm_pretty_printer_p()

static SCM gdbscm_pretty_printer_p ( SCM scm)
static

Definition at line 181 of file scm-pretty-print.c.

References ppscm_is_pretty_printer().

◆ gdbscm_pretty_printer_worker_p()

static SCM gdbscm_pretty_printer_worker_p ( SCM scm)
static

Definition at line 320 of file scm-pretty-print.c.

References ppscm_is_pretty_printer_worker().

◆ gdbscm_pretty_printers()

static SCM gdbscm_pretty_printers ( void )
static

Definition at line 244 of file scm-pretty-print.c.

References pretty_printer_list.

◆ gdbscm_set_pretty_printer_enabled_x()

static SCM gdbscm_set_pretty_printer_enabled_x ( SCM self,
SCM enabled )
static

◆ gdbscm_set_pretty_printers_x()

static SCM gdbscm_set_pretty_printers_x ( SCM printers)
static

Definition at line 253 of file scm-pretty-print.c.

References FUNC_NAME, gdbscm_is_true, and pretty_printer_list.

◆ ppscm_find_pretty_printer()

static SCM ppscm_find_pretty_printer ( SCM value)
static

◆ ppscm_find_pretty_printer_from_gdb()

static SCM ppscm_find_pretty_printer_from_gdb ( SCM value)
static

Definition at line 470 of file scm-pretty-print.c.

References ppscm_search_pp_list(), and pretty_printer_list.

Referenced by ppscm_find_pretty_printer().

◆ ppscm_find_pretty_printer_from_objfiles()

static SCM ppscm_find_pretty_printer_from_objfiles ( SCM value)
static

◆ ppscm_find_pretty_printer_from_progspace()

static SCM ppscm_find_pretty_printer_from_progspace ( SCM value)
static

◆ ppscm_get_display_hint_enum()

static enum display_hint ppscm_get_display_hint_enum ( SCM printer)
static

◆ ppscm_get_display_hint_scm()

static SCM ppscm_get_display_hint_scm ( SCM printer)
static

◆ ppscm_get_pretty_printer_arg_unsafe()

static SCM ppscm_get_pretty_printer_arg_unsafe ( SCM self,
int arg_pos,
const char * func_name )
static

◆ ppscm_get_pretty_printer_smob_arg_unsafe()

static pretty_printer_smob * ppscm_get_pretty_printer_smob_arg_unsafe ( SCM self,
int arg_pos,
const char * func_name )
static

◆ ppscm_is_pretty_printer()

static int ppscm_is_pretty_printer ( SCM scm)
static

◆ ppscm_is_pretty_printer_worker()

static int ppscm_is_pretty_printer_worker ( SCM scm)
static

◆ ppscm_make_pp_type_error_exception()

static SCM ppscm_make_pp_type_error_exception ( const char * message,
SCM object )
static

◆ ppscm_pretty_print_one_value()

static SCM ppscm_pretty_print_one_value ( SCM printer,
struct value ** out_value,
struct gdbarch * gdbarch,
const struct language_defn * language )
static

◆ ppscm_print_children()

static void ppscm_print_children ( SCM printer,
enum display_hint hint,
struct ui_file * stream,
int recurse,
const struct value_print_options * options,
struct gdbarch * gdbarch,
const struct language_defn * language,
int printed_nothing )
static

◆ ppscm_print_exception_unless_memory_error()

static void ppscm_print_exception_unless_memory_error ( SCM exception,
struct ui_file * stream )
static

◆ ppscm_print_pp_type_error()

static void ppscm_print_pp_type_error ( const char * message,
SCM object )
static

◆ ppscm_print_pretty_printer_smob()

static int ppscm_print_pretty_printer_smob ( SCM self,
SCM port,
scm_print_state * pstate )
static

◆ ppscm_print_pretty_printer_worker_smob()

static int ppscm_print_pretty_printer_worker_smob ( SCM self,
SCM port,
scm_print_state * pstate )
static

◆ ppscm_print_string_repr()

static enum guile_string_repr_result ppscm_print_string_repr ( SCM printer,
enum display_hint hint,
struct ui_file * stream,
int recurse,
const struct value_print_options * options,
struct gdbarch * gdbarch,
const struct language_defn * language )
static

◆ ppscm_search_pp_list()

static SCM ppscm_search_pp_list ( SCM list,
SCM value )
static

Variable Documentation

◆ pp_type_error_symbol

SCM pp_type_error_symbol
static

◆ ppscm_array_string

SCM ppscm_array_string
static

◆ ppscm_map_string

SCM ppscm_map_string
static

◆ ppscm_string_string

SCM ppscm_string_string
static

◆ pretty_printer_functions

const scheme_function pretty_printer_functions[]
static

Definition at line 1039 of file scm-pretty-print.c.

Referenced by gdbscm_initialize_pretty_printers().

◆ pretty_printer_list

SCM pretty_printer_list
static

◆ pretty_printer_smob_name

const char pretty_printer_smob_name[]
static

◆ pretty_printer_smob_tag

scm_t_bits pretty_printer_smob_tag
static

◆ pretty_printer_worker_smob_name

const char pretty_printer_worker_smob_name[]
static
Initial value:
=
"gdb:pretty-printer-worker"

Definition at line 107 of file scm-pretty-print.c.

Referenced by gdbscm_initialize_pretty_printers(), gdbscm_make_pretty_printer_worker(), and ppscm_print_pretty_printer_worker_smob().

◆ pretty_printer_worker_smob_tag

scm_t_bits pretty_printer_worker_smob_tag
static