GDB (xrefs)
Classes | Enumerations | Functions | Variables
scm-pretty-print.c File Reference
#include "defs.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  string_repr_result {
  STRING_REPR_NONE, STRING_REPR_ERROR, STRING_REPR_OK, 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 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 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)
 
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

Enumerator
HINT_NONE 
HINT_ERROR 
HINT_ARRAY 
HINT_MAP 
HINT_STRING 

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

Enumerator
STRING_REPR_NONE 
STRING_REPR_ERROR 
STRING_REPR_OK 
string_repr_none 
string_repr_error 
string_repr_ok 

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

Function Documentation

enum ext_lang_rc gdbscm_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 
)
void gdbscm_initialize_pretty_printers ( void  )
static SCM gdbscm_make_pretty_printer ( SCM  name,
SCM  lookup 
)
static
static SCM gdbscm_make_pretty_printer_worker ( SCM  display_hint,
SCM  to_string,
SCM  children 
)
static
static SCM gdbscm_pretty_printer_enabled_p ( SCM  self)
static
static SCM gdbscm_pretty_printer_p ( SCM  scm)
static

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

References ppscm_is_pretty_printer().

static SCM gdbscm_pretty_printer_worker_p ( SCM  scm)
static

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

References ppscm_is_pretty_printer_worker().

static SCM gdbscm_pretty_printers ( void  )
static

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

References pretty_printer_list.

static SCM gdbscm_set_pretty_printer_enabled_x ( SCM  self,
SCM  enabled 
)
static
static SCM gdbscm_set_pretty_printers_x ( SCM  printers)
static

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

References _, FUNC_NAME, gdbscm_is_true, and pretty_printer_list.

static SCM ppscm_find_pretty_printer ( SCM  value)
static
static SCM ppscm_find_pretty_printer_from_gdb ( SCM  value)
static

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

References ppscm_search_pp_list(), and pretty_printer_list.

Referenced by ppscm_find_pretty_printer().

static SCM ppscm_find_pretty_printer_from_objfiles ( SCM  value)
static
static SCM ppscm_find_pretty_printer_from_progspace ( SCM  value)
static
static enum display_hint ppscm_get_display_hint_enum ( SCM  printer)
static
static SCM ppscm_get_display_hint_scm ( SCM  printer)
static
static SCM ppscm_get_pretty_printer_arg_unsafe ( SCM  self,
int  arg_pos,
const char *  func_name 
)
static
static pretty_printer_smob* ppscm_get_pretty_printer_smob_arg_unsafe ( SCM  self,
int  arg_pos,
const char *  func_name 
)
static
static int ppscm_is_pretty_printer ( SCM  scm)
static
static int ppscm_is_pretty_printer_worker ( SCM  scm)
static
static SCM ppscm_make_pp_type_error_exception ( const char *  message,
SCM  object 
)
static
static SCM ppscm_pretty_print_one_value ( SCM  printer,
struct value **  out_value,
struct gdbarch gdbarch,
const struct language_defn language 
)
static
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
static void ppscm_print_exception_unless_memory_error ( SCM  exception,
struct ui_file stream 
)
static
static void ppscm_print_pp_type_error ( const char *  message,
SCM  object 
)
static
static int ppscm_print_pretty_printer_smob ( SCM  self,
SCM  port,
scm_print_state *  pstate 
)
static
static int ppscm_print_pretty_printer_worker_smob ( SCM  self,
SCM  port,
scm_print_state *  pstate 
)
static
static enum 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
static SCM ppscm_search_pp_list ( SCM  list,
SCM  value 
)
static

Variable Documentation

SCM pp_type_error_symbol
static
SCM ppscm_array_string
static
SCM ppscm_map_string
static
SCM ppscm_string_string
static
const scheme_function pretty_printer_functions[]
static

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

SCM pretty_printer_list
static
const char pretty_printer_smob_name[]
static
scm_t_bits pretty_printer_smob_tag
static
const char pretty_printer_worker_smob_name[]
static
Initial value:
=
"gdb:pretty-printer-worker"

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

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

scm_t_bits pretty_printer_worker_smob_tag
static