GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions | Variables
valprint.c File Reference
#include "defs.h"
#include "symtab.h"
#include "gdbtypes.h"
#include "value.h"
#include "gdbcore.h"
#include "gdbcmd.h"
#include "target.h"
#include "language.h"
#include "annotate.h"
#include "valprint.h"
#include "target-float.h"
#include "extension.h"
#include "ada-lang.h"
#include "gdbsupport/gdb_obstack.h"
#include "charset.h"
#include "typeprint.h"
#include <ctype.h>
#include <algorithm>
#include "gdbsupport/byte-vector.h"
#include "cli/cli-option.h"
#include "gdbarch.h"
#include "cli/cli-style.h"
#include "count-one-bits.h"
#include "c-lang.h"
#include "cp-abi.h"
#include "inferior.h"
#include "gdbsupport/selftest.h"
#include "selftest-arch.h"

Go to the source code of this file.

Classes

struct  converted_character
 

Macros

#define MAX_WCHARS   4
 
#define WCHAR_BUFLEN(X)   ((X) * sizeof (gdb_wchar_t))
 
#define WCHAR_BUFLEN_MAX   WCHAR_BUFLEN (MAX_WCHARS)
 
#define PRINT_MAX_DEFAULT   200
 
#define PRINT_MAX_CHARS_DEFAULT   PRINT_MAX_CHARS_ELEMENTS
 
#define PRINT_MAX_DEPTH_DEFAULT   20
 
#define BITS_IN_OCTAL   3
 
#define HIGH_ZERO   0340
 
#define LOW_ZERO   0034
 
#define CARRY_ZERO   0003
 
#define HIGH_ONE   0200
 
#define MID_ONE   0160
 
#define LOW_ONE   0016
 
#define CARRY_ONE   0001
 
#define HIGH_TWO   0300
 
#define MID_TWO   0070
 
#define LOW_TWO   0007
 
#define TEN   10
 
#define CARRY_OUT( x)   ((x) / TEN) /* extend char to int */
 
#define CARRY_LEFT(x)   ((x) % TEN)
 
#define SHIFT(x)   ((x) << 4)
 
#define LOW_NIBBLE( x)   ( (x) & 0x00F)
 
#define HIGH_NIBBLE(x)   (((x) & 0x0F0) >> 4)
 

Typedefs

using boolean_option_def = gdb::option::boolean_option_def<value_print_options>
 
using uinteger_option_def = gdb::option::uinteger_option_def<value_print_options>
 
using pinteger_option_def = gdb::option::pinteger_option_def<value_print_options>
 

Functions

static void set_input_radix_1 (int, unsigned)
 
static void set_output_radix_1 (int, unsigned)
 
static void val_print_type_code_flags (struct type *type, struct value *original_value, int embedded_offset, struct ui_file *stream)
 
void get_user_print_options (struct value_print_options *opts)
 
void get_no_prettyformat_print_options (struct value_print_options *opts)
 
void get_formatted_print_options (struct value_print_options *opts, char format)
 
static void show_print_max (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void show_print_max_chars (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void show_input_radix (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void show_output_radix (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void show_print_array_indexes (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void show_repeat_count_threshold (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void show_memory_tag_violations (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void show_stop_print_at_null (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void show_prettyformat_structs (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void show_prettyformat_arrays (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void show_unionprint (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void show_nibbles (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void show_addressprint (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void show_symbol_print (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
int val_print_scalar_type_p (struct type *type)
 
static bool val_print_scalar_or_string_type_p (struct type *type, const struct language_defn *language)
 
int valprint_check_validity (struct ui_file *stream, struct type *type, LONGEST embedded_offset, const struct value *val)
 
void val_print_optimized_out (const struct value *val, struct ui_file *stream)
 
void val_print_not_saved (struct ui_file *stream)
 
void val_print_unavailable (struct ui_file *stream)
 
void val_print_invalid_address (struct ui_file *stream)
 
static void print_unpacked_pointer (struct type *type, struct type *elttype, CORE_ADDR address, struct ui_file *stream, const struct value_print_options *options)
 
static void generic_val_print_array (struct value *val, struct ui_file *stream, int recurse, const struct value_print_options *options, const struct generic_val_print_decorations *decorations)
 
static void generic_value_print_ptr (struct value *val, struct ui_file *stream, const struct value_print_options *options)
 
static void print_ref_address (struct type *type, const gdb_byte *address_buffer, int embedded_offset, struct ui_file *stream)
 
static const gdb_byte * get_value_addr_contents (struct value *deref_val)
 
static void generic_val_print_ref (struct type *type, int embedded_offset, struct ui_file *stream, int recurse, struct value *original_value, const struct value_print_options *options)
 
static void generic_val_print_enum_1 (struct type *type, LONGEST val, struct ui_file *stream)
 
static void generic_val_print_enum (struct type *type, int embedded_offset, struct ui_file *stream, struct value *original_value, const struct value_print_options *options)
 
static void generic_val_print_func (struct type *type, int embedded_offset, CORE_ADDR address, struct ui_file *stream, struct value *original_value, const struct value_print_options *options)
 
static void generic_value_print_bool (struct value *value, struct ui_file *stream, const struct value_print_options *options, const struct generic_val_print_decorations *decorations)
 
static void generic_value_print_int (struct value *val, struct ui_file *stream, const struct value_print_options *options)
 
static void generic_value_print_char (struct value *value, struct ui_file *stream, const struct value_print_options *options)
 
static void generic_val_print_float (struct type *type, struct ui_file *stream, struct value *original_value, const struct value_print_options *options)
 
static void generic_val_print_fixed_point (struct value *val, struct ui_file *stream, const struct value_print_options *options)
 
static void generic_value_print_complex (struct value *val, struct ui_file *stream, const struct value_print_options *options, const struct generic_val_print_decorations *decorations)
 
static void generic_value_print_memberptr (struct value *val, struct ui_file *stream, int recurse, const struct value_print_options *options, const struct generic_val_print_decorations *decorations)
 
void generic_value_print (struct value *val, struct ui_file *stream, int recurse, const struct value_print_options *options, const struct generic_val_print_decorations *decorations)
 
void common_val_print (struct value *value, struct ui_file *stream, int recurse, const struct value_print_options *options, const struct language_defn *language)
 
bool val_print_check_max_depth (struct ui_file *stream, int recurse, const struct value_print_options *options, const struct language_defn *language)
 
static int value_check_printable (struct value *val, struct ui_file *stream, const struct value_print_options *options)
 
void common_val_print_checked (struct value *val, struct ui_file *stream, int recurse, const struct value_print_options *options, const struct language_defn *language)
 
void value_print (struct value *val, struct ui_file *stream, const struct value_print_options *options)
 
void ATTRIBUTE_UNUSED debug_val (struct value *val)
 
void value_print_scalar_formatted (struct value *val, const struct value_print_options *options, int size, struct ui_file *stream)
 
void print_longest (struct ui_file *stream, int format, int use_c_format, LONGEST val_long)
 
int longest_to_int (LONGEST arg)
 
void print_floating (const gdb_byte *valaddr, struct type *type, struct ui_file *stream)
 
void print_binary_chars (struct ui_file *stream, const gdb_byte *valaddr, unsigned len, enum bfd_endian byte_order, bool zero_pad, const struct value_print_options *options)
 
static void emit_octal_digit (struct ui_file *stream, bool *seen_a_one, int digit)
 
void print_octal_chars (struct ui_file *stream, const gdb_byte *valaddr, unsigned len, enum bfd_endian byte_order)
 
static bool maybe_negate_by_bytes (const gdb_byte *bytes, unsigned len, enum bfd_endian byte_order, gdb::byte_vector *out_vec)
 
void print_decimal_chars (struct ui_file *stream, const gdb_byte *valaddr, unsigned len, bool is_signed, enum bfd_endian byte_order)
 
void print_hex_chars (struct ui_file *stream, const gdb_byte *valaddr, unsigned len, enum bfd_endian byte_order, bool zero_pad)
 
void print_function_pointer_address (const struct value_print_options *options, struct gdbarch *gdbarch, CORE_ADDR address, struct ui_file *stream)
 
void maybe_print_array_index (struct type *index_type, LONGEST index, struct ui_file *stream, const struct value_print_options *options)
 
void value_print_array_elements (struct value *val, struct ui_file *stream, int recurse, const struct value_print_options *options, unsigned int i)
 
static int wchar_printable (gdb_wchar_t w)
 
static void append_string_as_wide (const char *string, struct obstack *output)
 
static void print_wchar (gdb_wint_t w, const gdb_byte *orig, int orig_len, int width, enum bfd_endian byte_order, struct obstack *output, int quoter, bool *need_escapep)
 
void generic_emit_char (int c, struct type *type, struct ui_file *stream, int quoter, const char *encoding)
 
static int count_next_character (wchar_iterator *iter, std::vector< converted_character > *vec)
 
static void print_converted_chars_to_obstack (struct obstack *obstack, const std::vector< converted_character > &chars, int quote_char, int width, enum bfd_endian byte_order, const struct value_print_options *options, int *finished)
 
void generic_printstr (struct ui_file *stream, struct type *type, const gdb_byte *string, unsigned int length, const char *encoding, int force_ellipses, int quote_char, int c_style_terminator, const struct value_print_options *options)
 
int val_print_string (struct type *elttype, const char *encoding, CORE_ADDR addr, int len, struct ui_file *stream, const struct value_print_options *options)
 
static void show_print_max_depth (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void set_input_radix (const char *args, int from_tty, struct cmd_list_element *c)
 
static void set_output_radix (const char *args, int from_tty, struct cmd_list_element *c)
 
static void set_radix (const char *arg, int from_tty)
 
static void show_radix (const char *arg, int from_tty)
 
static void show_vtblprint (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void show_objectprint (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static void show_static_field_print (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
gdb::option::option_def_group make_value_print_options_def_group (value_print_options *opts)
 
void _initialize_valprint ()
 

Variables

struct cmd_list_elementsetprintrawlist
 
struct cmd_list_elementshowprintrawlist
 
struct value_print_options user_print_options
 
unsigned input_radix = 10
 
unsigned output_radix = 10
 
static unsigned input_radix_1 = 10
 
static unsigned output_radix_1 = 10
 
static const literal_def print_characters_literals []
 
static const gdb::option::option_def value_print_option_defs []
 

Macro Definition Documentation

◆ BITS_IN_OCTAL

#define BITS_IN_OCTAL   3

◆ CARRY_LEFT

#define CARRY_LEFT ( x)    ((x) % TEN)

◆ CARRY_ONE

#define CARRY_ONE   0001

◆ CARRY_OUT

#define CARRY_OUT ( x)    ((x) / TEN) /* extend char to int */

◆ CARRY_ZERO

#define CARRY_ZERO   0003

◆ HIGH_NIBBLE

#define HIGH_NIBBLE ( x)    (((x) & 0x0F0) >> 4)

◆ HIGH_ONE

#define HIGH_ONE   0200

◆ HIGH_TWO

#define HIGH_TWO   0300

◆ HIGH_ZERO

#define HIGH_ZERO   0340

◆ LOW_NIBBLE

#define LOW_NIBBLE ( x)    ( (x) & 0x00F)

◆ LOW_ONE

#define LOW_ONE   0016

◆ LOW_TWO

#define LOW_TWO   0007

◆ LOW_ZERO

#define LOW_ZERO   0034

◆ MAX_WCHARS

#define MAX_WCHARS   4

Definition at line 50 of file valprint.c.

Referenced by count_next_character().

◆ MID_ONE

#define MID_ONE   0160

◆ MID_TWO

#define MID_TWO   0070

◆ PRINT_MAX_CHARS_DEFAULT

#define PRINT_MAX_CHARS_DEFAULT   PRINT_MAX_CHARS_ELEMENTS

Definition at line 101 of file valprint.c.

◆ PRINT_MAX_DEFAULT

#define PRINT_MAX_DEFAULT   200

Definition at line 98 of file valprint.c.

◆ PRINT_MAX_DEPTH_DEFAULT

#define PRINT_MAX_DEPTH_DEFAULT   20

Definition at line 104 of file valprint.c.

◆ SHIFT

#define SHIFT ( x)    ((x) << 4)

◆ TEN

#define TEN   10

◆ WCHAR_BUFLEN

#define WCHAR_BUFLEN ( X)    ((X) * sizeof (gdb_wchar_t))

Definition at line 54 of file valprint.c.

Referenced by count_next_character().

◆ WCHAR_BUFLEN_MAX

#define WCHAR_BUFLEN_MAX   WCHAR_BUFLEN (MAX_WCHARS)

Definition at line 57 of file valprint.c.

Typedef Documentation

◆ boolean_option_def

Definition at line 2907 of file valprint.c.

◆ pinteger_option_def

Definition at line 2909 of file valprint.c.

◆ uinteger_option_def

Definition at line 2908 of file valprint.c.

Function Documentation

◆ _initialize_valprint()

void _initialize_valprint ( )

Definition at line 3127 of file valprint.c.

Referenced by initialize_all_files().

◆ append_string_as_wide()

static void append_string_as_wide ( const char * string,
struct obstack * output )
static

Definition at line 2090 of file valprint.c.

References gdb_btowc.

Referenced by print_wchar().

◆ common_val_print()

void common_val_print ( struct value * value,
struct ui_file * stream,
int recurse,
const struct value_print_options * options,
const struct language_defn * language )

Definition at line 1033 of file valprint.c.

References ada_to_fixed_value(), apply_ext_lang_val_pretty_printer(), check_typedef(), value::fetch_lazy(), fprintf_styled(), gdb_printf(), type::is_stub(), language_ada, value::lazy(), metadata_style, value_print_options::prettyformat, value_print_options::prettyformat_structs, QUIT, value_print_options::raw, cli_style_option::style(), value_print_options::summary, value::type(), Val_no_prettyformat, Val_prettyformat, Val_prettyformat_default, val_print_check_max_depth(), val_print_scalar_or_string_type_p(), val_print_scalar_type_p(), and valprint_check_validity().

Referenced by ada_val_print_ref(), ada_value_print(), ada_value_print_inner(), ada_value_print_num(), ada_value_print_ptr(), ada_varobj_get_value_image(), c_value_print(), common_val_print_checked(), cp_print_static_field(), cp_print_value_fields(), default_print_one_register_info(), gdbscm_value_print(), generic_val_print_ref(), list_arg_or_local(), mi_cmd_data_evaluate_expression(), output_register(), pascal_object_print_static_field(), pascal_object_print_value_fields(), ppscm_print_children(), ppscm_print_string_repr(), print_children(), rust_language::print_enum(), print_field_values(), print_string_repr(), print_unpacked_pointer(), print_variable_at_address(), print_variable_or_computed(), fortran_array_printer_impl::process_element(), py_print_value(), riscv_print_one_register_info(), val_print_packed_array_elements(), rust_language::val_print_struct(), valpy_format_string(), valpy_str(), pascal_language::value_print(), rust_language::value_print(), value_print_array_elements(), f_language::value_print_inner(), pascal_language::value_print_inner(), value_print_scalar_formatted(), varobj_value_get_print_value(), and vlscm_print_value_smob().

◆ common_val_print_checked()

void common_val_print_checked ( struct value * val,
struct ui_file * stream,
int recurse,
const struct value_print_options * options,
const struct language_defn * language )

Definition at line 1177 of file valprint.c.

References common_val_print(), and value_check_printable().

Referenced by print_frame_arg(), and print_variable_and_value().

◆ count_next_character()

static int count_next_character ( wchar_iterator * iter,
std::vector< converted_character > * vec )
static

◆ debug_val()

void ATTRIBUTE_UNUSED debug_val ( struct value * val)
extern

Definition at line 1218 of file valprint.c.

References gdb_flush(), gdb_stdlog, user_print_options, and value_print().

◆ emit_octal_digit()

static void emit_octal_digit ( struct ui_file * stream,
bool * seen_a_one,
int digit )
static

Definition at line 1492 of file valprint.c.

References gdb_printf().

Referenced by print_octal_chars().

◆ generic_emit_char()

void generic_emit_char ( int c,
struct type * type,
struct ui_file * stream,
int quoter,
const char * encoding )

◆ generic_printstr()

void generic_printstr ( struct ui_file * stream,
struct type * type,
const gdb_byte * string,
unsigned int length,
const char * encoding,
int force_ellipses,
int quote_char,
int c_style_terminator,
const struct value_print_options * options )

◆ generic_val_print_array()

static void generic_val_print_array ( struct value * val,
struct ui_file * stream,
int recurse,
const struct value_print_options * options,
const struct generic_val_print_decorations * decorations )
static

◆ generic_val_print_enum()

static void generic_val_print_enum ( struct type * type,
int embedded_offset,
struct ui_file * stream,
struct value * original_value,
const struct value_print_options * options )
static

◆ generic_val_print_enum_1()

static void generic_val_print_enum_1 ( struct type * type,
LONGEST val,
struct ui_file * stream )
static

◆ generic_val_print_fixed_point()

static void generic_val_print_fixed_point ( struct value * val,
struct ui_file * stream,
const struct value_print_options * options )
static

◆ generic_val_print_float()

static void generic_val_print_float ( struct type * type,
struct ui_file * stream,
struct value * original_value,
const struct value_print_options * options )
static

◆ generic_val_print_func()

static void generic_val_print_func ( struct type * type,
int embedded_offset,
CORE_ADDR address,
struct ui_file * stream,
struct value * original_value,
const struct value_print_options * options )
static

◆ generic_val_print_ref()

static void generic_val_print_ref ( struct type * type,
int embedded_offset,
struct ui_file * stream,
int recurse,
struct value * original_value,
const struct value_print_options * options )
static

◆ generic_value_print()

void generic_value_print ( struct value * val,
struct ui_file * stream,
int recurse,
const struct value_print_options * options,
const struct generic_val_print_decorations * decorations )

◆ generic_value_print_bool()

static void generic_value_print_bool ( struct value * value,
struct ui_file * stream,
const struct value_print_options * options,
const struct generic_val_print_decorations * decorations )
static

◆ generic_value_print_char()

static void generic_value_print_char ( struct value * value,
struct ui_file * stream,
const struct value_print_options * options )
static

◆ generic_value_print_complex()

static void generic_value_print_complex ( struct value * val,
struct ui_file * stream,
const struct value_print_options * options,
const struct generic_val_print_decorations * decorations )
static

◆ generic_value_print_int()

static void generic_value_print_int ( struct value * val,
struct ui_file * stream,
const struct value_print_options * options )
static

◆ generic_value_print_memberptr()

static void generic_value_print_memberptr ( struct value * val,
struct ui_file * stream,
int recurse,
const struct value_print_options * options,
const struct generic_val_print_decorations * decorations )
static

◆ generic_value_print_ptr()

static void generic_value_print_ptr ( struct value * val,
struct ui_file * stream,
const struct value_print_options * options )
static

◆ get_formatted_print_options()

void get_formatted_print_options ( struct value_print_options * opts,
char format )

◆ get_no_prettyformat_print_options()

void get_no_prettyformat_print_options ( struct value_print_options * opts)

◆ get_user_print_options()

void get_user_print_options ( struct value_print_options * opts)

◆ get_value_addr_contents()

static const gdb_byte * get_value_addr_contents ( struct value * deref_val)
static

Definition at line 546 of file valprint.c.

References value::contents_for_printing(), value::lval(), lval_memory, and value_addr().

Referenced by generic_val_print_ref().

◆ longest_to_int()

int longest_to_int ( LONGEST arg)

Optional native machine support. Non-native (and possibly pure multi-arch) targets do not need a "nm.h" file. This will be a symlink to one of the nm-*.h files, built by the ‘configure’ script.
Convert a LONGEST to an int. This is used in contexts (e.g. number of arguments to a function, number in a value history, register number, etc.) where the value must not be larger than can fit in an int.

Definition at line 1372 of file valprint.c.

Referenced by ada_ternop_slice(), ada_type_of_array(), expr::ada_name_association::assign(), eval_op_repeat(), dwarf_expr_context::fetch_result(), and ignore_command().

◆ make_value_print_options_def_group()

gdb::option::option_def_group make_value_print_options_def_group ( value_print_options * opts)

◆ maybe_negate_by_bytes()

static bool maybe_negate_by_bytes ( const gdb_byte * bytes,
unsigned len,
enum bfd_endian byte_order,
gdb::byte_vector * out_vec )
static

Definition at line 1661 of file valprint.c.

Referenced by print_decimal_chars().

◆ maybe_print_array_index()

void maybe_print_array_index ( struct type * index_type,
LONGEST index,
struct ui_file * stream,
const struct value_print_options * options )

◆ print_binary_chars()

void print_binary_chars ( struct ui_file * stream,
const gdb_byte * valaddr,
unsigned len,
enum bfd_endian byte_order,
bool zero_pad,
const struct value_print_options * options )

◆ print_converted_chars_to_obstack()

static void print_converted_chars_to_obstack ( struct obstack * obstack,
const std::vector< converted_character > & chars,
int quote_char,
int width,
enum bfd_endian byte_order,
const struct value_print_options * options,
int * finished )
static

◆ print_decimal_chars()

void print_decimal_chars ( struct ui_file * stream,
const gdb_byte * valaddr,
unsigned len,
bool is_signed,
enum bfd_endian byte_order )

◆ print_floating()

void print_floating ( const gdb_byte * valaddr,
struct type * type,
struct ui_file * stream )

◆ print_function_pointer_address()

void print_function_pointer_address ( const struct value_print_options * options,
struct gdbarch * gdbarch,
CORE_ADDR address,
struct ui_file * stream )

◆ print_hex_chars()

void print_hex_chars ( struct ui_file * stream,
const gdb_byte * valaddr,
unsigned len,
enum bfd_endian byte_order,
bool zero_pad )

◆ print_longest()

void print_longest ( struct ui_file * stream,
int format,
int use_c_format,
LONGEST val_long )

◆ print_octal_chars()

void print_octal_chars ( struct ui_file * stream,
const gdb_byte * valaddr,
unsigned len,
enum bfd_endian byte_order )

◆ print_ref_address()

static void print_ref_address ( struct type * type,
const gdb_byte * address_buffer,
int embedded_offset,
struct ui_file * stream )
static

Definition at line 526 of file valprint.c.

References type::arch(), extract_typed_address(), gdb_printf(), gdb_puts(), and paddress().

Referenced by generic_val_print_ref().

◆ print_unpacked_pointer()

static void print_unpacked_pointer ( struct type * type,
struct type * elttype,
CORE_ADDR address,
struct ui_file * stream,
const struct value_print_options * options )
static

◆ print_wchar()

static void print_wchar ( gdb_wint_t w,
const gdb_byte * orig,
int orig_len,
int width,
enum bfd_endian byte_order,
struct obstack * output,
int quoter,
bool * need_escapep )
static

◆ set_input_radix()

static void set_input_radix ( const char * args,
int from_tty,
struct cmd_list_element * c )
static

Definition at line 2748 of file valprint.c.

References input_radix_1, and set_input_radix_1().

◆ set_input_radix_1()

static void set_input_radix_1 ( int from_tty,
unsigned radix )
static

Definition at line 2754 of file valprint.c.

References gdb_printf(), input_radix, and input_radix_1.

Referenced by set_input_radix(), and set_radix().

◆ set_output_radix()

static void set_output_radix ( const char * args,
int from_tty,
struct cmd_list_element * c )
static

Definition at line 2785 of file valprint.c.

References output_radix_1, and set_output_radix_1().

◆ set_output_radix_1()

static void set_output_radix_1 ( int from_tty,
unsigned radix )
static

◆ set_radix()

static void set_radix ( const char * arg,
int from_tty )
static

◆ show_addressprint()

static void show_addressprint ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 295 of file valprint.c.

References gdb_printf().

◆ show_input_radix()

static void show_input_radix ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 188 of file valprint.c.

References gdb_printf().

◆ show_memory_tag_violations()

static void show_memory_tag_violations ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 231 of file valprint.c.

References gdb_printf().

◆ show_nibbles()

static void show_nibbles ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 284 of file valprint.c.

References gdb_printf().

◆ show_objectprint()

static void show_objectprint ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 2884 of file valprint.c.

References gdb_printf().

◆ show_output_radix()

static void show_output_radix ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 198 of file valprint.c.

References gdb_printf().

◆ show_prettyformat_arrays()

static void show_prettyformat_arrays ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 263 of file valprint.c.

References gdb_printf().

◆ show_prettyformat_structs()

static void show_prettyformat_structs ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 254 of file valprint.c.

References gdb_printf().

◆ show_print_array_indexes()

static void show_print_array_indexes ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 210 of file valprint.c.

References gdb_printf().

◆ show_print_max()

static void show_print_max ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

◆ show_print_max_chars()

static void show_print_max_chars ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 176 of file valprint.c.

References gdb_printf().

◆ show_print_max_depth()

static void show_print_max_depth ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 2730 of file valprint.c.

References gdb_printf().

◆ show_radix()

static void show_radix ( const char * arg,
int from_tty )
static

Definition at line 2848 of file valprint.c.

References gdb_printf(), input_radix, and output_radix.

◆ show_repeat_count_threshold()

static void show_repeat_count_threshold ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 221 of file valprint.c.

References gdb_printf().

◆ show_static_field_print()

static void show_static_field_print ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 2894 of file valprint.c.

References gdb_printf().

◆ show_stop_print_at_null()

static void show_stop_print_at_null ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 242 of file valprint.c.

References gdb_printf().

◆ show_symbol_print()

static void show_symbol_print ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 302 of file valprint.c.

References gdb_printf().

◆ show_unionprint()

static void show_unionprint ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 273 of file valprint.c.

References gdb_printf().

◆ show_vtblprint()

static void show_vtblprint ( struct ui_file * file,
int from_tty,
struct cmd_list_element * c,
const char * value )
static

Definition at line 2873 of file valprint.c.

References gdb_printf().

◆ val_print_check_max_depth()

bool val_print_check_max_depth ( struct ui_file * stream,
int recurse,
const struct value_print_options * options,
const struct language_defn * language )

◆ val_print_invalid_address()

void val_print_invalid_address ( struct ui_file * stream)

Definition at line 437 of file valprint.c.

References fprintf_styled(), metadata_style, and cli_style_option::style().

Referenced by cp_print_value(), and pascal_object_print_value().

◆ val_print_not_saved()

void val_print_not_saved ( struct ui_file * stream)

◆ val_print_optimized_out()

void val_print_optimized_out ( const struct value * val,
struct ui_file * stream )

◆ val_print_scalar_or_string_type_p()

static bool val_print_scalar_or_string_type_p ( struct type * type,
const struct language_defn * language )
static

Definition at line 343 of file valprint.c.

References val_print_scalar_type_p().

Referenced by common_val_print().

◆ val_print_scalar_type_p()

int val_print_scalar_type_p ( struct type * type)

◆ val_print_string()

int val_print_string ( struct type * elttype,
const char * encoding,
CORE_ADDR addr,
int len,
struct ui_file * stream,
const struct value_print_options * options )

◆ val_print_type_code_flags()

static void val_print_type_code_flags ( struct type * type,
struct value * original_value,
int embedded_offset,
struct ui_file * stream )
static

◆ val_print_unavailable()

void val_print_unavailable ( struct ui_file * stream)

◆ valprint_check_validity()

int valprint_check_validity ( struct ui_file * stream,
struct type * type,
LONGEST embedded_offset,
const struct value * val )

◆ value_check_printable()

static int value_check_printable ( struct value * val,
struct ui_file * stream,
const struct value_print_options * options )
static

◆ value_print()

void value_print ( struct value * val,
struct ui_file * stream,
const struct value_print_options * options )

◆ value_print_array_elements()

void value_print_array_elements ( struct value * val,
struct ui_file * stream,
int recurse,
const struct value_print_options * options,
unsigned int i )

◆ value_print_scalar_formatted()

void value_print_scalar_formatted ( struct value * val,
const struct value_print_options * options,
int size,
struct ui_file * stream )

◆ wchar_printable()

static int wchar_printable ( gdb_wchar_t w)
static

Definition at line 2077 of file valprint.c.

References gdb_iswprint, and LCST.

Referenced by generic_emit_char().

Variable Documentation

◆ input_radix

unsigned input_radix = 10

◆ input_radix_1

unsigned input_radix_1 = 10
static

Definition at line 2741 of file valprint.c.

Referenced by set_input_radix(), and set_input_radix_1().

◆ output_radix

unsigned output_radix = 10

Definition at line 196 of file valprint.c.

Referenced by set_output_radix_1(), and show_radix().

◆ output_radix_1

unsigned output_radix_1 = 10
static

Definition at line 2782 of file valprint.c.

Referenced by set_output_radix(), and set_output_radix_1().

◆ print_characters_literals

const literal_def print_characters_literals[]
static
Initial value:
=
{
{ "elements", PRINT_MAX_CHARS_ELEMENTS },
{ "unlimited", PRINT_MAX_CHARS_UNLIMITED, 0 },
{ nullptr }
}
#define PRINT_MAX_CHARS_ELEMENTS
Definition valprint.h:123
#define PRINT_MAX_CHARS_UNLIMITED
Definition valprint.h:126

Definition at line 2913 of file valprint.c.

◆ setprintrawlist

struct cmd_list_element* setprintrawlist

Definition at line 83 of file valprint.c.

◆ showprintrawlist

struct cmd_list_element* showprintrawlist

Definition at line 84 of file valprint.c.

◆ user_print_options

struct value_print_options user_print_options
Initial value:
=
{
false,
false,
false,
true,
true,
false,
false,
10,
0,
0,
true,
false,
false,
false,
true,
true,
false,
false,
true,
}
#define PRINT_MAX_CHARS_DEFAULT
Definition valprint.c:101
#define PRINT_MAX_DEFAULT
Definition valprint.c:98
#define PRINT_MAX_DEPTH_DEFAULT
Definition valprint.c:104
@ Val_prettyformat_default
Definition valprint.h:33

Definition at line 106 of file valprint.c.

Referenced by debug_val(), get_formatted_print_options(), get_no_prettyformat_print_options(), get_user_print_options(), set_output_radix_1(), and show_print_max().

◆ value_print_option_defs

const gdb::option::option_def value_print_option_defs[]
static

Definition at line 2922 of file valprint.c.

Referenced by make_value_print_options_def_group().