GDB (xrefs)
|
#include "defs.h"
#include "gdb_string.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 "floatformat.h"
#include "doublest.h"
#include "exceptions.h"
#include "dfp.h"
#include "python/python.h"
#include "ada-lang.h"
#include "gdb_obstack.h"
#include "charset.h"
#include <ctype.h>
#include <errno.h>
Go to the source code of this file.
Classes | |
struct | converted_character |
Defines | |
#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 /* Start print_max off at this value. */ |
#define | BITS_IN_BYTES 8 |
#define | BITS_IN_OCTAL 3 |
#define | HIGH_ZERO 0340 |
#define | LOW_ZERO 0016 |
#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 | |
typedef struct converted_character | converted_character_d |
Functions | |
DEF_VEC_O (converted_character_d) | |
static int | partial_memory_read (CORE_ADDR memaddr, gdb_byte *myaddr, int len, int *errptr) |
static void | show_print (char *, int) |
static void | set_print (char *, int) |
static void | set_radix (char *, int) |
static void | show_radix (char *, int) |
static void | set_input_radix (char *, int, struct cmd_list_element *) |
static void | set_input_radix_1 (int, unsigned) |
static void | set_output_radix (char *, int, struct cmd_list_element *) |
static void | set_output_radix_1 (int, unsigned) |
void | _initialize_valprint (void) |
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_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_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_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) |
int | valprint_check_validity (struct ui_file *stream, struct type *type, int embedded_offset, const struct value *val) |
void | val_print_optimized_out (const struct value *val, struct ui_file *stream) |
void | val_print_unavailable (struct ui_file *stream) |
void | val_print_invalid_address (struct ui_file *stream) |
void | generic_val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset, CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *original_value, const struct value_print_options *options, const struct generic_val_print_decorations *decorations) |
void | val_print (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) |
static int | value_check_printable (struct value *val, struct ui_file *stream, const struct value_print_options *options) |
void | common_val_print (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 | val_print_type_code_int (struct type *type, const gdb_byte *valaddr, struct ui_file *stream) |
void | val_print_type_code_flags (struct type *type, const gdb_byte *valaddr, struct ui_file *stream) |
void | val_print_scalar_formatted (struct type *type, const gdb_byte *valaddr, int embedded_offset, const 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_decimal_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) |
void | print_octal_chars (struct ui_file *stream, const gdb_byte *valaddr, unsigned len, enum bfd_endian byte_order) |
void | print_decimal_chars (struct ui_file *stream, const gdb_byte *valaddr, unsigned len, enum bfd_endian byte_order) |
void | print_hex_chars (struct ui_file *stream, const gdb_byte *valaddr, unsigned len, enum bfd_endian byte_order) |
void | print_char_chars (struct ui_file *stream, struct type *type, const gdb_byte *valaddr, unsigned len, enum bfd_endian byte_order) |
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 | val_print_array_elements (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, unsigned int i) |
int | read_string (CORE_ADDR addr, int len, int width, unsigned int fetchlimit, enum bfd_endian byte_order, gdb_byte **buffer, int *bytes_read) |
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, int *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 (struct wchar_iterator *iter, VEC(converted_character_d)**vec) |
static void | print_converted_chars_to_obstack (struct obstack *obstack, VEC(converted_character_d)*chars, int quote_char, int width, enum bfd_endian byte_order, const struct value_print_options *options) |
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 | set_print_raw (char *arg, int from_tty) |
static void | show_print_raw (char *args, int from_tty) |
Variables | |
struct cmd_list_element * | setprintrawlist |
struct cmd_list_element * | showprintrawlist |
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 |
#define BITS_IN_BYTES 8 |
Referenced by print_binary_chars(), and print_octal_chars().
#define BITS_IN_OCTAL 3 |
Referenced by print_octal_chars().
#define CARRY_LEFT | ( | x | ) | ((x) % TEN) |
Referenced by print_decimal_chars().
#define CARRY_ONE 0001 |
Referenced by print_octal_chars().
Referenced by print_decimal_chars().
#define CARRY_ZERO 0003 |
Referenced by print_octal_chars().
#define HIGH_NIBBLE | ( | x | ) | (((x) & 0x0F0) >> 4) |
Referenced by print_decimal_chars().
#define HIGH_ONE 0200 |
#define HIGH_TWO 0300 |
#define HIGH_ZERO 0340 |
Referenced by print_octal_chars().
#define LOW_NIBBLE | ( | x | ) | ( (x) & 0x00F) |
Referenced by print_decimal_chars().
#define LOW_ONE 0016 |
Referenced by print_octal_chars().
#define LOW_TWO 0007 |
Referenced by print_octal_chars().
#define LOW_ZERO 0016 |
Referenced by print_octal_chars().
#define MAX_WCHARS 4 |
Definition at line 44 of file valprint.c.
Referenced by count_next_character().
#define MID_ONE 0160 |
Referenced by print_octal_chars().
#define MID_TWO 0070 |
Referenced by print_octal_chars().
#define PRINT_MAX_DEFAULT 200 /* Start print_max off at this value. */ |
Definition at line 106 of file valprint.c.
#define SHIFT | ( | x | ) | ((x) << 4) |
Referenced by print_decimal_chars().
#define TEN 10 |
#define WCHAR_BUFLEN | ( | X | ) | ((X) * sizeof (gdb_wchar_t)) |
Definition at line 48 of file valprint.c.
Referenced by count_next_character().
#define WCHAR_BUFLEN_MAX WCHAR_BUFLEN (MAX_WCHARS) |
Definition at line 51 of file valprint.c.
typedef struct converted_character converted_character_d |
Definition at line 76 of file valprint.c.
void _initialize_valprint | ( | void | ) |
static void append_string_as_wide | ( | const char * | string, |
struct obstack * | output | ||
) | [static] |
Definition at line 1903 of file valprint.c.
References gdb_btowc, and string.
Referenced by print_wchar().
void common_val_print | ( | struct value * | val, |
struct ui_file * | stream, | ||
int | recurse, | ||
const struct value_print_options * | options, | ||
const struct language_defn * | language | ||
) |
Definition at line 832 of file valprint.c.
References ada_to_fixed_value(), language_defn::la_language, language_ada, val_print(), value_address(), value_check_printable(), value_contents_for_printing(), value_embedded_offset(), and value_type().
Referenced by ada_val_print_1(), ada_varobj_get_value_image(), c_val_print(), cp_print_value_fields(), gdb_eval(), generic_val_print(), java_print_value_fields(), java_value_print(), list_arg_or_local(), mi_cmd_data_evaluate_expression(), pascal_object_print_static_field(), pascal_object_print_value_fields(), pascal_val_print(), pascal_value_print(), print_frame_arg(), print_variable_and_value(), print_variable_at_address(), print_variable_or_computed(), py_print_value(), and value_get_print_value().
static int count_next_character | ( | struct wchar_iterator * | iter, |
VEC(converted_character_d)** | vec | ||
) | [static] |
Definition at line 2094 of file valprint.c.
References converted_character::buf, converted_character::buflen, converted_character::chars, gdb_assert, MAX_WCHARS, memcmp(), memcpy(), converted_character::num_chars, converted_character::repeat_count, converted_character::result, VEC_empty, VEC_last, VEC_safe_push, WCHAR_BUFLEN, and wchar_iterate().
Referenced by generic_printstr().
void generic_emit_char | ( | int | c, |
struct type * | type, | ||
struct ui_file * | stream, | ||
int | quoter, | ||
const char * | encoding | ||
) |
Definition at line 2009 of file valprint.c.
References convert_between_encodings(), do_cleanups(), fputs_filtered(), gdb_WEOF, gdbarch_byte_order(), get_type_arch(), host_charset(), INTERMEDIATE_ENCODING, make_cleanup_obstack_free(), make_cleanup_wchar_iterator(), make_wchar_iterator(), pack_long(), print_wchar(), translit_char, TYPE_LENGTH, wchar_iterate(), and wchar_printable().
Referenced by c_emit_char(), f_emit_char(), and java_emit_char().
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 | ||
) |
Definition at line 2338 of file valprint.c.
References convert_between_encodings(), count_next_character(), do_cleanups(), extract_unsigned_integer(), fputs_filtered(), gdbarch_byte_order(), get_type_arch(), host_charset(), INTERMEDIATE_ENCODING, LCST, make_cleanup(), make_cleanup_obstack_free(), make_cleanup_wchar_iterator(), make_wchar_iterator(), obstack_grow_wstr, print_converted_chars_to_obstack(), QUIT, converted_character::result, translit_char, TYPE_LENGTH, VEC, VEC_cleanup, VEC_last, and wchar_iterate_eof.
Referenced by c_printstr(), f_printstr(), and java_printstr().
void generic_val_print | ( | struct type * | type, |
const gdb_byte * | valaddr, | ||
int | embedded_offset, | ||
CORE_ADDR | address, | ||
struct ui_file * | stream, | ||
int | recurse, | ||
const struct value * | original_value, | ||
const struct value_print_options * | options, | ||
const struct generic_val_print_decorations * | decorations | ||
) |
Definition at line 371 of file valprint.c.
References _, value_print_options::addressprint, check_typedef(), CHECK_TYPEDEF, coerce_ref_if_computed(), common_val_print(), generic_val_print_decorations::complex_infix, generic_val_print_decorations::complex_prefix, generic_val_print_decorations::complex_suffix, current_language, demangle, value_print_options::deref_ref, error(), extract_typed_address(), generic_val_print_decorations::false_name, value_print_options::format, fprintf_filtered(), fputs_filtered(), gdb_assert, gdb_flush(), get_array_bounds(), get_type_arch(), LA_PRINT_CHAR, len, LONGEST, value_print_options::output_format, paddress(), value_print_options::prettyformat_arrays, print_address_demangle(), print_decimal_floating(), print_floating(), print_function_pointer_address(), print_longest(), print_spaces_filtered(), print_unpacked_pointer(), QUIT, value_print_options::symbol_print, generic_val_print_decorations::true_name, type, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_BOOL, TYPE_CODE_CHAR, TYPE_CODE_COMPLEX, TYPE_CODE_DECFLOAT, TYPE_CODE_ENUM, TYPE_CODE_ERROR, TYPE_CODE_FLAGS, TYPE_CODE_FLT, TYPE_CODE_FUNC, TYPE_CODE_INT, TYPE_CODE_MEMBERPTR, TYPE_CODE_METHOD, TYPE_CODE_METHODPTR, TYPE_CODE_PTR, TYPE_CODE_RANGE, TYPE_CODE_REF, TYPE_CODE_STRUCT, TYPE_CODE_UNDEF, TYPE_CODE_UNION, TYPE_CODE_VOID, TYPE_ERROR_NAME, TYPE_FIELD_ENUMVAL, TYPE_FIELD_NAME, TYPE_FLAG_ENUM, TYPE_LENGTH, TYPE_NFIELDS, type_print(), TYPE_TARGET_TYPE, TYPE_UNSIGNED, unpack_long(), unpack_pointer(), val_print_array_elements(), val_print_scalar_formatted(), val_print_type_code_flags(), val_print_type_code_int(), value_at(), and generic_val_print_decorations::void_name.
Referenced by c_val_print(), f_val_print(), m2_val_print(), and pascal_val_print().
void get_formatted_print_options | ( | struct value_print_options * | opts, |
char | format | ||
) |
Definition at line 150 of file valprint.c.
References value_print_options::format, and user_print_options.
Referenced by ada_value_of_variable(), default_print_one_register_info(), do_examine(), do_one_display(), dwarf2_compute_name(), gdb_eval(), gdb_update_mem(), get_register(), mi_cmd_data_read_memory(), mips_print_fp_register(), mips_print_register(), output_command_const(), output_register(), print_command_1(), sh64_do_register(), value_get_print_value(), and wrap_val_print().
void get_no_prettyformat_print_options | ( | struct value_print_options * | opts | ) |
Definition at line 141 of file valprint.c.
References value_print_options::prettyformat, user_print_options, and Val_no_prettyformat.
Referenced by list_arg_or_local(), mt_registers_info(), print_frame_arg(), print_return_value(), print_subexp_standard(), and print_variable_or_computed().
void get_user_print_options | ( | struct value_print_options * | opts | ) |
Definition at line 133 of file valprint.c.
References user_print_options.
Referenced by breakpoint_1(), cplus_describe_child(), cplus_number_of_children(), decode_agent_options(), default_print_one_register_info(), enumerate_args(), enumerate_locals(), evaluate_subexp_standard(), fprint_target_auxv(), gnuv3_print_method_ptr(), gnuv3_print_vtable(), info_common_command_for_block(), mi_cmd_data_evaluate_expression(), print_frame(), print_frame_info(), print_one_breakpoint_location(), print_one_catch_exec(), print_one_catch_fork(), print_one_catch_solib(), print_one_catch_syscall(), print_one_catch_vfork(), print_one_exception(), print_one_exception_catchpoint(), print_one_ranged_breakpoint(), print_subexp_standard(), print_variable_and_value(), py_print_frame(), say_where(), show_convenience(), show_values(), signal_catchpoint_print_one(), skip_info(), update_type_if_necessary(), value_actual_type(), watchpoint_value_print(), and whatis_exp().
int longest_to_int | ( | LONGEST | arg | ) |
Definition at line 1038 of file valprint.c.
References _, error(), int, and LONGEST.
Referenced by ada_dump_subexp_body(), ada_forward_operator_length(), ada_operator_length(), ada_type_of_array(), aggregate_assign_from_choices(), aggregate_assign_positional(), dump_subexp_body_standard(), dwarf2_evaluate_loc_desc_full(), evaluate_subexp_c(), evaluate_subexp_java(), evaluate_subexp_opencl(), evaluate_subexp_standard(), extract_field_op(), gen_expr(), ignore_command(), operator_length_standard(), print_subexp_standard(), resolve_subexp(), value_concat(), value_equal(), value_f90_subarray(), value_less(), and value_subscripted_rvalue().
void maybe_print_array_index | ( | struct type * | index_type, |
LONGEST | index, | ||
struct ui_file * | stream, | ||
const struct value_print_options * | options | ||
) |
Definition at line 1580 of file valprint.c.
References LA_PRINT_ARRAY_INDEX, value_print_options::print_array_indexes, and value_from_longest().
Referenced by val_print_array_elements(), and val_print_packed_array_elements().
static int partial_memory_read | ( | CORE_ADDR | memaddr, |
gdb_byte * | myaddr, | ||
int | len, | ||
int * | errptr | ||
) | [static] |
Definition at line 1721 of file valprint.c.
References len, and target_read_memory().
Referenced by read_string().
void print_binary_chars | ( | struct ui_file * | stream, |
const gdb_byte * | valaddr, | ||
unsigned | len, | ||
enum bfd_endian | byte_order | ||
) |
Definition at line 1144 of file valprint.c.
References BITS_IN_BYTES, fprintf_filtered(), len, and p.
Referenced by print_scalar_formatted().
void print_char_chars | ( | struct ui_file * | stream, |
struct type * | type, | ||
const gdb_byte * | valaddr, | ||
unsigned | len, | ||
enum bfd_endian | byte_order | ||
) |
Definition at line 1519 of file valprint.c.
References LA_EMIT_CHAR, and p.
Referenced by print_scalar_formatted().
static void print_converted_chars_to_obstack | ( | struct obstack * | obstack, |
VEC(converted_character_d)* | chars, | ||
int | quote_char, | ||
int | width, | ||
enum bfd_endian | byte_order, | ||
const struct value_print_options * | options | ||
) | [static] |
Definition at line 2180 of file valprint.c.
References _, converted_character::buf, converted_character::buflen, converted_character::chars, gdb_btowc, gdb_WEOF, LCST, obstack_grow_wstr, print_wchar(), converted_character::repeat_count, value_print_options::repeat_count_threshold, converted_character::result, VEC_index, wchar_iterate_eof, wchar_iterate_incomplete, wchar_iterate_invalid, wchar_iterate_ok, xfree(), and xstrprintf().
Referenced by generic_printstr().
void print_decimal_chars | ( | struct ui_file * | stream, |
const gdb_byte * | valaddr, | ||
unsigned | len, | ||
enum bfd_endian | byte_order | ||
) |
Definition at line 1355 of file valprint.c.
References CARRY_LEFT, CARRY_OUT, dummy, fprintf_filtered(), HIGH_NIBBLE, LOW_NIBBLE, p, SHIFT, xfree(), and xmalloc().
Referenced by print_scalar_formatted().
void print_decimal_floating | ( | const gdb_byte * | valaddr, |
struct type * | type, | ||
struct ui_file * | stream | ||
) |
Definition at line 1131 of file valprint.c.
References decimal_to_string(), fputs_filtered(), gdbarch_byte_order(), get_type_arch(), len, MAX_DECIMAL_STRING, and TYPE_LENGTH.
Referenced by generic_val_print().
void print_floating | ( | const gdb_byte * | valaddr, |
struct type * | type, | ||
struct ui_file * | stream | ||
) |
Definition at line 1058 of file valprint.c.
References float_infinite, float_nan, floatformat_classify(), floatformat_from_type(), floatformat_is_negative(), floatformat_mantissa(), fprintf_filtered(), fputs_filtered(), len, TYPE_CODE, TYPE_CODE_FLT, TYPE_LENGTH, and unpack_double().
Referenced by ada_print_floating(), generic_val_print(), and print_scalar_formatted().
void print_function_pointer_address | ( | const struct value_print_options * | options, |
struct gdbarch * | gdbarch, | ||
CORE_ADDR | address, | ||
struct ui_file * | stream | ||
) |
Definition at line 1555 of file valprint.c.
References value_print_options::addressprint, current_target, demangle, fputs_filtered(), gdbarch_convert_from_func_ptr_addr(), paddress(), and print_address_demangle().
Referenced by c_val_print(), cp_print_value_fields(), f_val_print(), generic_val_print(), print_one_vtable(), and print_unpacked_pointer().
void print_hex_chars | ( | struct ui_file * | stream, |
const gdb_byte * | valaddr, | ||
unsigned | len, | ||
enum bfd_endian | byte_order | ||
) |
Definition at line 1486 of file valprint.c.
References fprintf_filtered(), fputs_filtered(), len, and p.
Referenced by default_print_one_register_info(), print_scalar_formatted(), regcache_dump(), sh64_do_fp_register(), and val_print_type_code_int().
void print_longest | ( | struct ui_file * | stream, |
int | format, | ||
int | use_c_format, | ||
LONGEST | val_long | ||
) |
Definition at line 1000 of file valprint.c.
References _, fputs_filtered(), int_string(), and internal_error().
Referenced by ada_print_scalar(), ada_val_print_1(), ax_print(), dump_raw_expression(), generic_val_print(), gnuv3_print_method_ptr(), h8300_print_register(), java_val_print(), m68hc11_print_register(), mt_registers_info(), print_scalar_formatted(), print_type_scalar(), and val_print_type_code_int().
void print_octal_chars | ( | struct ui_file * | stream, |
const gdb_byte * | valaddr, | ||
unsigned | len, | ||
enum bfd_endian | byte_order | ||
) |
Definition at line 1204 of file valprint.c.
References _, BITS_IN_BYTES, BITS_IN_OCTAL, CARRY_ONE, CARRY_ZERO, error(), fprintf_filtered(), fputs_filtered(), HIGH_ZERO, len, LOW_ONE, LOW_TWO, LOW_ZERO, MID_ONE, MID_TWO, and p.
Referenced by print_scalar_formatted().
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, | ||
int * | need_escapep | ||
) | [static] |
Definition at line 1923 of file valprint.c.
References append_string_as_wide(), extract_unsigned_integer(), gdb_btowc, gdb_iswdigit, gdb_iswprint, LCST, obstack_grow_wstr, ULONGEST, and xsnprintf().
Referenced by generic_emit_char(), and print_converted_chars_to_obstack().
int read_string | ( | CORE_ADDR | addr, |
int | len, | ||
int | width, | ||
unsigned int | fetchlimit, | ||
enum bfd_endian | byte_order, | ||
gdb_byte ** | buffer, | ||
int * | bytes_read | ||
) |
Definition at line 1777 of file valprint.c.
References discard_cleanups(), extract_unsigned_integer(), free_current_contents(), make_cleanup(), min, partial_memory_read(), QUIT, xmalloc(), and xrealloc().
Referenced by c_get_string(), and val_print_string().
static void set_input_radix | ( | char * | args, |
int | from_tty, | ||
struct cmd_list_element * | c | ||
) | [static] |
Definition at line 2555 of file valprint.c.
References set_input_radix_1().
static void set_input_radix_1 | ( | int | from_tty, |
unsigned | radix | ||
) | [static] |
Definition at line 2561 of file valprint.c.
References _, error(), input_radix, and printf_filtered().
Referenced by set_input_radix(), and set_radix().
static void set_output_radix | ( | char * | args, |
int | from_tty, | ||
struct cmd_list_element * | c | ||
) | [static] |
Definition at line 2592 of file valprint.c.
References set_output_radix_1().
static void set_output_radix_1 | ( | int | from_tty, |
unsigned | radix | ||
) | [static] |
Definition at line 2598 of file valprint.c.
References _, error(), value_print_options::output_format, output_radix, and printf_filtered().
Referenced by set_output_radix(), and set_radix().
Definition at line 2679 of file valprint.c.
References gdb_stdout, help_list(), printf_unfiltered(), and setprintlist.
static void set_print_raw | ( | char * | arg, |
int | from_tty | ||
) | [static] |
Definition at line 2693 of file valprint.c.
References gdb_stdout, help_list(), and printf_unfiltered().
Definition at line 2637 of file valprint.c.
References _, parse_and_eval_long(), printf_filtered(), set_input_radix_1(), and set_output_radix_1().
static void show_addressprint | ( | struct ui_file * | file, |
int | from_tty, | ||
struct cmd_list_element * | c, | ||
const char * | value | ||
) | [static] |
Definition at line 257 of file valprint.c.
References _, and fprintf_filtered().
static void show_input_radix | ( | struct ui_file * | file, |
int | from_tty, | ||
struct cmd_list_element * | c, | ||
const char * | value | ||
) | [static] |
Definition at line 172 of file valprint.c.
References _, and fprintf_filtered().
static void show_output_radix | ( | struct ui_file * | file, |
int | from_tty, | ||
struct cmd_list_element * | c, | ||
const char * | value | ||
) | [static] |
Definition at line 182 of file valprint.c.
References _, and fprintf_filtered().
static void show_prettyformat_arrays | ( | struct ui_file * | file, |
int | from_tty, | ||
struct cmd_list_element * | c, | ||
const char * | value | ||
) | [static] |
Definition at line 236 of file valprint.c.
References _, and fprintf_filtered().
static void show_prettyformat_structs | ( | struct ui_file * | file, |
int | from_tty, | ||
struct cmd_list_element * | c, | ||
const char * | value | ||
) | [static] |
Definition at line 227 of file valprint.c.
References _, and fprintf_filtered().
static void show_print | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 2687 of file valprint.c.
References cmd_show_list(), and showprintlist.
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 194 of file valprint.c.
References _, and fprintf_filtered().
static void show_print_max | ( | struct ui_file * | file, |
int | from_tty, | ||
struct cmd_list_element * | c, | ||
const char * | value | ||
) | [static] |
Definition at line 158 of file valprint.c.
References _, and fprintf_filtered().
static void show_print_raw | ( | char * | args, |
int | from_tty | ||
) | [static] |
Definition at line 2701 of file valprint.c.
References cmd_show_list().
static void show_radix | ( | char * | arg, |
int | from_tty | ||
) | [static] |
Definition at line 2655 of file valprint.c.
References _, input_radix, output_radix, and printf_filtered().
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 205 of file valprint.c.
References _, and fprintf_filtered().
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 215 of file valprint.c.
References _, and fprintf_filtered().
static void show_symbol_print | ( | struct ui_file * | file, |
int | from_tty, | ||
struct cmd_list_element * | c, | ||
const char * | value | ||
) | [static] |
Definition at line 264 of file valprint.c.
References _, and fprintf_filtered().
static void show_unionprint | ( | struct ui_file * | file, |
int | from_tty, | ||
struct cmd_list_element * | c, | ||
const char * | value | ||
) | [static] |
Definition at line 246 of file valprint.c.
References _, and fprintf_filtered().
void val_print | ( | 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 734 of file valprint.c.
References _, apply_val_pretty_printer(), check_typedef(), fprintf_filtered(), gdb_flush(), language_defn::la_val_print, value_print_options::prettyformat, value_print_options::prettyformat_structs, QUIT, value_print_options::raw, gdb_exception::reason, RETURN_MASK_ERROR, value_print_options::summary, TRY_CATCH, TYPE_STUB, Val_no_prettyformat, Val_prettyformat, Val_prettyformat_default, val_print_scalar_type_p(), and valprint_check_validity().
Referenced by ada_val_print_1(), ada_value_print(), c_value_print(), common_val_print(), cp_print_static_field(), cp_print_value_fields(), default_print_one_register_info(), f77_print_array_1(), f_val_print(), get_register(), java_print_value_fields(), mt_registers_info(), output_register(), pascal_object_print_value_fields(), print_field_values(), sh64_do_register(), val_print_array_elements(), val_print_packed_array_elements(), val_print_scalar_formatted(), and wrap_val_print().
void val_print_array_elements | ( | 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, | ||
unsigned int | i | ||
) |
Definition at line 1603 of file valprint.c.
References _, annotate_array_section_begin(), annotate_array_section_end(), annotate_elt(), annotate_elt_rep(), annotate_elt_rep_end(), check_typedef(), current_language, fprintf_filtered(), get_array_bounds(), len, LONGEST, maybe_print_array_index(), n_spaces(), value_print_options::prettyformat_arrays, value_print_options::print_max, print_spaces_filtered(), value_print_options::repeat_count_threshold, TYPE_INDEX_TYPE, TYPE_LENGTH, TYPE_TARGET_TYPE, val_print(), value_available_contents_eq(), warning(), and wrap_here().
Referenced by ada_val_print_array(), c_val_print(), generic_val_print(), m2_print_array_contents(), m2_val_print(), and pascal_val_print().
void val_print_invalid_address | ( | struct ui_file * | stream | ) |
Definition at line 354 of file valprint.c.
References _, and fprintf_filtered().
Referenced by cp_print_value(), and pascal_object_print_value().
void val_print_optimized_out | ( | const struct value * | val, |
struct ui_file * | stream | ||
) |
Definition at line 339 of file valprint.c.
References _, fprintf_filtered(), lval_register, and value_lval_const().
Referenced by cp_print_value_fields(), default_print_one_register_info(), java_print_value_fields(), pascal_object_print_value_fields(), val_print_scalar_formatted(), valprint_check_validity(), and value_check_printable().
void val_print_scalar_formatted | ( | struct type * | type, |
const gdb_byte * | valaddr, | ||
int | embedded_offset, | ||
const struct value * | val, | ||
const struct value_print_options * | options, | ||
int | size, | ||
struct ui_file * | stream | ||
) |
Definition at line 945 of file valprint.c.
References current_language, value_print_options::deref_ref, value_print_options::format, gdb_assert, print_scalar_formatted(), TYPE_LENGTH, val_print(), val_print_optimized_out(), val_print_unavailable(), value_bits_valid(), value_bytes_available(), and value_contents_for_printing_const().
Referenced by ada_val_print_1(), c_val_print(), f_val_print(), generic_val_print(), java_val_print(), m2_val_print(), mips_print_register(), pascal_val_print(), and print_formatted().
int val_print_scalar_type_p | ( | struct type * | type | ) |
Definition at line 279 of file valprint.c.
References CHECK_TYPEDEF, TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_REF, TYPE_CODE_SET, TYPE_CODE_STRING, TYPE_CODE_STRUCT, TYPE_CODE_UNION, and TYPE_TARGET_TYPE.
Referenced by list_arg_or_local(), val_print(), and value_check_printable().
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 | ||
) |
Definition at line 2454 of file valprint.c.
References gdbarch::byte_order, do_cleanups(), extract_unsigned_integer(), fprintf_filtered(), fputs_filtered(), gdb_flush(), gdbarch_byte_order(), get_type_arch(), LA_PRINT_STRING, make_cleanup(), memory_error_message(), min, value_print_options::print_max, read_string(), target_read_memory(), TYPE_LENGTH, and xfree().
Referenced by c_val_print(), f_val_print(), fprint_target_auxv(), java_value_print(), m2_print_array_contents(), pascal_val_print(), print_formatted(), print_go_string(), print_unpacked_pointer(), and value_get_print_value().
void val_print_type_code_flags | ( | struct type * | type, |
const gdb_byte * | valaddr, | ||
struct ui_file * | stream | ||
) |
Definition at line 916 of file valprint.c.
References fprintf_filtered(), fputs_filtered(), TYPE_FIELD_BITPOS, TYPE_FIELD_NAME, TYPE_NFIELDS, ULONGEST, and unpack_long().
Referenced by generic_val_print().
void val_print_type_code_int | ( | struct type * | type, |
const gdb_byte * | valaddr, | ||
struct ui_file * | stream | ||
) |
Definition at line 883 of file valprint.c.
References extract_long_unsigned_integer(), gdbarch_byte_order(), get_type_arch(), LONGEST, print_hex_chars(), print_longest(), TYPE_LENGTH, TYPE_UNSIGNED, and unpack_long().
Referenced by ada_val_print_1(), c_val_print(), f_val_print(), generic_val_print(), and java_val_print().
void val_print_unavailable | ( | struct ui_file * | stream | ) |
Definition at line 348 of file valprint.c.
References _, and fprintf_filtered().
Referenced by cp_print_value(), pascal_object_print_value(), val_print_scalar_formatted(), and valprint_check_validity().
int valprint_check_validity | ( | struct ui_file * | stream, |
struct type * | type, | ||
int | embedded_offset, | ||
const struct value * | val | ||
) |
Definition at line 303 of file valprint.c.
References _, CHECK_TYPEDEF, fputs_filtered(), TYPE_CODE, TYPE_CODE_ARRAY, TYPE_CODE_STRUCT, TYPE_CODE_UNION, TYPE_LENGTH, val_print_optimized_out(), val_print_unavailable(), value_bits_synthetic_pointer(), value_bits_valid(), and value_bytes_available().
Referenced by cp_print_value_fields(), and val_print().
static int value_check_printable | ( | struct value * | val, |
struct ui_file * | stream, | ||
const struct value_print_options * | options | ||
) | [static] |
Definition at line 797 of file valprint.c.
References _, fprintf_filtered(), value_print_options::summary, TYPE_CODE, TYPE_CODE_INTERNAL_FUNCTION, val_print_optimized_out(), val_print_scalar_type_p(), value_entirely_optimized_out(), value_internal_function_name(), and value_type().
Referenced by common_val_print(), and value_print().
void value_print | ( | struct value * | val, |
struct ui_file * | stream, | ||
const struct value_print_options * | options | ||
) |
Definition at line 856 of file valprint.c.
References apply_val_pretty_printer(), current_language, LA_VALUE_PRINT, value_print_options::raw, value_address(), value_check_printable(), value_contents_for_printing(), value_embedded_offset(), and value_type().
Referenced by dwarf2_compute_name(), info_common_command_for_block(), print_formatted(), print_return_value(), print_scalar_formatted(), print_subexp_standard(), show_convenience(), show_values(), and watchpoint_value_print().
static int wchar_printable | ( | gdb_wchar_t | w | ) | [static] |
Definition at line 1890 of file valprint.c.
References gdb_iswprint, and LCST.
Referenced by generic_emit_char().
unsigned input_radix = 10 |
Definition at line 170 of file valprint.c.
Referenced by breakpoint_re_set(), classify_name(), init_raw_breakpoint_without_location(), lex_one_token(), parse_number(), prepare_re_set_context(), set_input_radix_1(), show_radix(), varobj_set_value(), and yylex().
unsigned input_radix_1 = 10 [static] |
Definition at line 2548 of file valprint.c.
unsigned output_radix = 10 |
Definition at line 180 of file valprint.c.
Referenced by set_output_radix_1(), and show_radix().
unsigned output_radix_1 = 10 [static] |
Definition at line 2589 of file valprint.c.
struct cmd_list_element* setprintrawlist |
Definition at line 80 of file valprint.c.
struct cmd_list_element* showprintrawlist |
Definition at line 81 of file valprint.c.
{ Val_prettyformat_default, 0, 0, 0, 1, 1, 0, PRINT_MAX_DEFAULT, 10, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1 }
Definition at line 108 of file valprint.c.
Referenced by _initialize_pascal_valprint(), get_formatted_print_options(), get_no_prettyformat_print_options(), and get_user_print_options().