GDB (xrefs)
|
#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) |
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_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 |
static const literal_def | print_characters_literals [] |
static const gdb::option::option_def | value_print_option_defs [] |
#define BITS_IN_OCTAL 3 |
#define CARRY_LEFT | ( | x | ) | ((x) % TEN) |
#define CARRY_ONE 0001 |
#define CARRY_OUT | ( | x | ) | ((x) / TEN) /* extend char to int */ |
#define CARRY_ZERO 0003 |
#define HIGH_NIBBLE | ( | x | ) | (((x) & 0x0F0) >> 4) |
#define HIGH_ONE 0200 |
#define HIGH_TWO 0300 |
#define HIGH_ZERO 0340 |
#define LOW_NIBBLE | ( | x | ) | ( (x) & 0x00F) |
#define LOW_ONE 0016 |
#define LOW_TWO 0007 |
#define LOW_ZERO 0034 |
#define MAX_WCHARS 4 |
Definition at line 50 of file valprint.c.
Referenced by count_next_character().
#define MID_ONE 0160 |
#define MID_TWO 0070 |
#define PRINT_MAX_CHARS_DEFAULT PRINT_MAX_CHARS_ELEMENTS |
Definition at line 101 of file valprint.c.
#define PRINT_MAX_DEFAULT 200 |
Definition at line 98 of file valprint.c.
#define PRINT_MAX_DEPTH_DEFAULT 20 |
Definition at line 104 of file valprint.c.
#define SHIFT | ( | x | ) | ((x) << 4) |
#define TEN 10 |
#define WCHAR_BUFLEN | ( | X | ) | ((X) * sizeof (gdb_wchar_t)) |
Definition at line 54 of file valprint.c.
Referenced by count_next_character().
#define WCHAR_BUFLEN_MAX WCHAR_BUFLEN (MAX_WCHARS) |
Definition at line 57 of file valprint.c.
Definition at line 2907 of file valprint.c.
Definition at line 2909 of file valprint.c.
Definition at line 2908 of file valprint.c.
void _initialize_valprint | ( | ) |
Definition at line 3127 of file valprint.c.
Referenced by initialize_all_files().
|
static |
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().
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().
|
static |
Definition at line 2281 of file valprint.c.
References converted_character::buf, converted_character::buflen, converted_character::chars, wchar_iterator::iterate(), MAX_WCHARS, converted_character::num_chars, converted_character::repeat_count, converted_character::result, and WCHAR_BUFLEN.
Referenced by generic_printstr().
|
extern |
Definition at line 1218 of file valprint.c.
References gdb_flush(), gdb_stdlog, user_print_options, and value_print().
|
static |
Definition at line 1492 of file valprint.c.
References gdb_printf().
Referenced by print_octal_chars().
void generic_emit_char | ( | int | c, |
struct type * | type, | ||
struct ui_file * | stream, | ||
int | quoter, | ||
const char * | encoding ) |
Definition at line 2205 of file valprint.c.
References convert_between_encodings(), gdb_puts(), gdb_WEOF, host_charset(), INTERMEDIATE_ENCODING, wchar_iterator::iterate(), type::length(), pack_long(), print_wchar(), translit_char, type_byte_order(), and wchar_printable().
Referenced by language_defn::emitchar(), f_language::emitchar(), and rust_language::emitchar().
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 2536 of file valprint.c.
References convert_between_encodings(), count_next_character(), extract_unsigned_integer(), gdb_printf(), gdb_puts(), get_print_max_chars(), host_charset(), INTERMEDIATE_ENCODING, LCST, type::length(), print_converted_chars_to_obstack(), QUIT, converted_character::result, translit_char, type_byte_order(), and wchar_iterate_eof.
Referenced by language_defn::printstr(), f_language::printstr(), and rust_language::printstr().
|
static |
Definition at line 472 of file valprint.c.
References value::address, generic_val_print_decorations::array_end, generic_val_print_decorations::array_start, check_typedef(), gdb_puts(), get_array_bounds(), type::length(), print_unpacked_pointer(), type::target_type(), value::type(), and value_print_array_elements().
Referenced by generic_value_print().
|
static |
Definition at line 712 of file valprint.c.
References type::arch(), value::contents_for_printing(), value_print_options::format, gdbarch_addressable_memory_unit_size(), generic_val_print_enum_1(), and unpack_long().
Referenced by generic_value_print().
|
static |
Definition at line 628 of file valprint.c.
References type::field(), fputs_styled(), gdb_puts(), type::is_flag_enum(), field::loc_enumval(), field::name(), type::num_fields(), print_longest(), QUIT, cli_style_option::style(), and variable_name_style.
Referenced by generic_val_print_enum(), and val_print_type_code_flags().
|
static |
Definition at line 842 of file valprint.c.
References value::contents_for_printing(), f(), type::fixed_point_scaling_factor(), value_print_options::format, gdb_printf(), type::is_unsigned(), type::length(), gdb_mpf::read_fixed_point(), value::type(), type_byte_order(), and value_print_scalar_formatted().
Referenced by generic_value_print().
|
static |
Definition at line 828 of file valprint.c.
References value::contents_for_printing(), value_print_options::format, and print_floating().
Referenced by generic_value_print().
|
static |
Definition at line 733 of file valprint.c.
References type::arch(), demangle, value_print_options::format, gdb_printf(), print_address_demangle(), and type_print().
Referenced by generic_value_print().
|
static |
Definition at line 562 of file valprint.c.
References value::address, value_print_options::addressprint, value::bits_synthetic_pointer(), check_typedef(), type::code(), coerce_ref_if_computed(), common_val_print(), value::contents_for_printing(), current_language, value_print_options::deref_ref, value::embedded_offset(), gdb_puts(), get_value_addr_contents(), type::length(), print_ref_address(), type::target_type(), TYPE_CODE_UNDEF, unpack_pointer(), and value_at().
Referenced by 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 ) |
Definition at line 907 of file valprint.c.
References value::address, check_typedef(), type::code(), value::contents_for_printing(), cplus_print_method_ptr(), type::fixed_point_type_base_type(), value_print_options::format, fprintf_styled(), gdb_printf(), gdb_puts(), generic_val_print_array(), generic_val_print_enum(), generic_val_print_fixed_point(), generic_val_print_float(), generic_val_print_func(), generic_val_print_ref(), generic_value_print_bool(), generic_value_print_char(), generic_value_print_complex(), generic_value_print_int(), generic_value_print_memberptr(), generic_value_print_ptr(), is_fixed_point_type(), metadata_style, cli_style_option::style(), type::target_type(), value::type(), TYPE_CODE_UNDEF, TYPE_ERROR_NAME, val_print_type_code_flags(), value_cast(), value_print_scalar_formatted(), and generic_val_print_decorations::void_name.
Referenced by c_value_print_inner(), rust_val_print_slice(), f_language::value_print_inner(), m2_language::value_print_inner(), pascal_language::value_print_inner(), and rust_language::value_print_inner().
|
static |
Definition at line 756 of file valprint.c.
References check_typedef(), value::contents_for_printing(), generic_val_print_decorations::false_name, value_print_options::format, gdb_puts(), value_print_options::output_format, print_longest(), generic_val_print_decorations::true_name, value::type(), unpack_long(), and value_print_scalar_formatted().
Referenced by generic_value_print().
|
static |
Definition at line 798 of file valprint.c.
References check_typedef(), value::contents_for_printing(), current_language, value_print_options::format, gdb_printf(), gdb_puts(), type::is_unsigned(), value_print_options::output_format, language_defn::printchar(), value::type(), unpack_long(), and value_print_scalar_formatted().
Referenced by generic_value_print().
|
static |
Definition at line 867 of file valprint.c.
References generic_val_print_decorations::complex_infix, generic_val_print_decorations::complex_prefix, generic_val_print_decorations::complex_suffix, gdb_printf(), value_imaginary_part(), value_print_scalar_formatted(), and value_real_part().
Referenced by generic_value_print().
|
static |
Definition at line 785 of file valprint.c.
References value_print_options::format, value_print_options::output_format, and value_print_scalar_formatted().
Referenced by generic_value_print().
|
static |
Definition at line 886 of file valprint.c.
References check_typedef(), value::contents_for_printing(), cp_print_class_member(), value_print_options::format, value::type(), and value_print_scalar_formatted().
Referenced by generic_value_print().
|
static |
Definition at line 505 of file valprint.c.
References check_typedef(), value::contents_for_printing(), value_print_options::format, print_unpacked_pointer(), type::target_type(), value::type(), unpack_pointer(), and value_print_scalar_formatted().
Referenced by generic_value_print().
void get_formatted_print_options | ( | struct value_print_options * | opts, |
char | format ) |
Definition at line 152 of file valprint.c.
References value_print_options::format, and user_print_options.
Referenced by default_print_one_register_info(), do_examine(), do_one_display(), dwarf2_compute_name(), mi_cmd_data_read_memory(), mips_print_fp_register(), mips_print_register(), output_command(), output_register(), riscv_print_one_register_info(), and varobj_formatted_print_options().
void get_no_prettyformat_print_options | ( | struct value_print_options * | opts | ) |
Definition at line 143 of file valprint.c.
References user_print_options, and Val_no_prettyformat.
Referenced by list_arg_or_local(), print_frame_arg(), print_variable_or_computed(), and shell_internal_fn().
void get_user_print_options | ( | struct value_print_options * | opts | ) |
Definition at line 135 of file valprint.c.
References user_print_options.
Referenced by breakpoint_1(), check_thread_db_callback(), compile_print_command(), cplus_describe_child(), cplus_number_of_children(), decode_agent_options(), default_print_one_register_info(), enumerate_args(), enumerate_locals(), eval_op_structop_ptr(), fprint_auxv_entry(), gdbpy_get_print_options(), gdbscm_value_print(), gnuv3_print_method_ptr(), gnuv3_print_vtable(), info_common_command_for_block(), info_skip_command(), maintenance_print_record_instruction(), mi_cmd_data_evaluate_expression(), print_frame_info(), ada_catchpoint::print_one(), exec_catchpoint::print_one(), fork_catchpoint::print_one(), solib_catchpoint::print_one(), signal_catchpoint::print_one(), syscall_catchpoint::print_one(), exception_catchpoint::print_one(), ranged_breakpoint::print_one(), print_one_breakpoint_location(), print_return_value_1(), print_variable_and_value(), process_print_command_args(), py_print_frame(), riscv_print_one_register_info(), code_breakpoint::say_where(), show_convenience(), show_values(), stpy_str(), ui_printf(), unwind_infopy_str(), update_type_if_necessary(), value_actual_type(), vlscm_print_value_smob(), watchpoint_value_print(), and whatis_exp().
|
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().
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().
gdb::option::option_def_group make_value_print_options_def_group | ( | value_print_options * | opts | ) |
Definition at line 3093 of file valprint.c.
References value_print_option_defs.
Referenced by compile_print_command(), print_command_completer(), process_print_command_args(), and ui_printf().
|
static |
Definition at line 1661 of file valprint.c.
Referenced by print_decimal_chars().
void maybe_print_array_index | ( | struct type * | index_type, |
LONGEST | index, | ||
struct ui_file * | stream, | ||
const struct value_print_options * | options ) |
Definition at line 1928 of file valprint.c.
References current_language, language_defn::print_array_index(), and value_print_options::print_array_indexes.
Referenced by fortran_array_printer_impl::process_dimension(), fortran_array_printer_impl::process_element(), val_print_packed_array_elements(), and value_print_array_elements().
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 ) |
Definition at line 1400 of file valprint.c.
References current_language, gdb_putc(), language_defn::get_digit_separator(), and value_print_options::nibblesprint.
Referenced by print_scalar_formatted().
|
static |
Definition at line 2367 of file valprint.c.
References converted_character::buf, converted_character::buflen, converted_character::chars, gdb_btowc, gdb_WEOF, LCST, value_print_options::print_max, value_print_options::print_max_chars, print_wchar(), converted_character::repeat_count, value_print_options::repeat_count_threshold, converted_character::result, SINGLE, wchar_iterate_eof, wchar_iterate_incomplete, wchar_iterate_invalid, and wchar_iterate_ok.
Referenced by generic_printstr().
void print_decimal_chars | ( | struct ui_file * | stream, |
const gdb_byte * | valaddr, | ||
unsigned | len, | ||
bool | is_signed, | ||
enum bfd_endian | byte_order ) |
Definition at line 1705 of file valprint.c.
References CARRY_LEFT, CARRY_OUT, dummy, gdb_printf(), gdb_puts(), HIGH_NIBBLE, LOW_NIBBLE, maybe_negate_by_bytes(), and SHIFT.
Referenced by print_scalar_formatted().
Definition at line 1392 of file valprint.c.
References gdb_puts(), and target_float_to_string().
Referenced by ada_print_floating(), expr::float_const_operation::dump(), generic_val_print_float(), 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 1904 of file valprint.c.
References value_print_options::addressprint, current_inferior(), demangle, gdb_puts(), gdbarch_convert_from_func_ptr_addr(), paddress(), and print_address_demangle().
Referenced by c_value_print_ptr(), c_value_print_struct(), cp_print_value_fields(), print_one_vtable(), print_unpacked_pointer(), print_unpacked_pointer(), print_unpacked_pointer(), and f_language::value_print_inner().
void print_hex_chars | ( | struct ui_file * | stream, |
const gdb_byte * | valaddr, | ||
unsigned | len, | ||
enum bfd_endian | byte_order, | ||
bool | zero_pad ) |
Definition at line 1841 of file valprint.c.
References gdb_printf(), and gdb_puts().
Referenced by default_print_one_register_info(), register_dump_regcache::dump_reg(), print_scalar_formatted(), and riscv_print_one_register_info().
void print_longest | ( | struct ui_file * | stream, |
int | format, | ||
int | use_c_format, | ||
LONGEST | val_long ) |
Definition at line 1335 of file valprint.c.
References value_print_options::format, and gdb_puts().
Referenced by ada_print_scalar(), ada_val_print_enum(), ax_print(), generic_val_print_enum_1(), generic_value_print_bool(), gnuv3_print_method_ptr(), h8300_print_register(), m68hc11_print_register(), print_type_scalar(), and val_print_type_code_flags().
void print_octal_chars | ( | struct ui_file * | stream, |
const gdb_byte * | valaddr, | ||
unsigned | len, | ||
enum bfd_endian | byte_order ) |
Definition at line 1504 of file valprint.c.
References BITS_IN_OCTAL, CARRY_ONE, CARRY_ZERO, emit_octal_digit(), gdb_puts(), HIGH_ONE, HIGH_TWO, HIGH_ZERO, LOW_ONE, LOW_TWO, LOW_ZERO, MID_ONE, and MID_TWO.
Referenced by print_scalar_formatted().
|
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().
|
static |
Definition at line 450 of file valprint.c.
References value_print_options::addressprint, type::arch(), type::code(), demangle, gdb_puts(), paddress(), print_address_demangle(), print_function_pointer_address(), and value_print_options::symbol_print.
Referenced by generic_val_print_array(), and generic_value_print_ptr().
|
static |
Definition at line 2110 of file valprint.c.
References append_string_as_wide(), extract_unsigned_integer(), gdb_btowc, gdb_iswprint, gdb_iswxdigit, LCST, and value.
Referenced by generic_emit_char(), and print_converted_chars_to_obstack().
|
static |
Definition at line 2748 of file valprint.c.
References input_radix_1, and set_input_radix_1().
|
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().
|
static |
Definition at line 2785 of file valprint.c.
References output_radix_1, and set_output_radix_1().
|
static |
Definition at line 2791 of file valprint.c.
References gdb_printf(), value_print_options::output_format, output_radix, output_radix_1, and user_print_options.
Referenced by set_output_radix(), and set_radix().
|
static |
Definition at line 2830 of file valprint.c.
References gdb_printf(), parse_and_eval_long(), set_input_radix_1(), and set_output_radix_1().
|
static |
Definition at line 295 of file valprint.c.
References gdb_printf().
|
static |
Definition at line 188 of file valprint.c.
References gdb_printf().
|
static |
Definition at line 231 of file valprint.c.
References gdb_printf().
|
static |
Definition at line 284 of file valprint.c.
References gdb_printf().
|
static |
Definition at line 2884 of file valprint.c.
References gdb_printf().
|
static |
Definition at line 198 of file valprint.c.
References gdb_printf().
|
static |
Definition at line 263 of file valprint.c.
References gdb_printf().
|
static |
Definition at line 254 of file valprint.c.
References gdb_printf().
|
static |
Definition at line 210 of file valprint.c.
References gdb_printf().
|
static |
Definition at line 162 of file valprint.c.
References gdb_printf(), value_print_options::print_max_chars, PRINT_MAX_CHARS_ELEMENTS, and user_print_options.
|
static |
Definition at line 176 of file valprint.c.
References gdb_printf().
|
static |
Definition at line 2730 of file valprint.c.
References gdb_printf().
|
static |
Definition at line 2848 of file valprint.c.
References gdb_printf(), input_radix, and output_radix.
|
static |
Definition at line 221 of file valprint.c.
References gdb_printf().
|
static |
Definition at line 2894 of file valprint.c.
References gdb_printf().
|
static |
Definition at line 242 of file valprint.c.
References gdb_printf().
|
static |
Definition at line 302 of file valprint.c.
References gdb_printf().
|
static |
Definition at line 273 of file valprint.c.
References gdb_printf().
|
static |
Definition at line 2873 of file valprint.c.
References gdb_printf().
bool val_print_check_max_depth | ( | struct ui_file * | stream, |
int | recurse, | ||
const struct value_print_options * | options, | ||
const struct language_defn * | language ) |
Definition at line 1104 of file valprint.c.
References gdb_puts(), and value_print_options::max_depth.
Referenced by common_val_print(), cp_print_value(), ppscm_print_children(), and print_children().
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().
void val_print_not_saved | ( | struct ui_file * | stream | ) |
Definition at line 425 of file valprint.c.
References fprintf_styled(), metadata_style, and cli_style_option::style().
Referenced by frame_unwind_register_value(), info_frame_command_core(), and val_print_optimized_out().
Definition at line 416 of file valprint.c.
References fprintf_styled(), value::lval(), lval_register, metadata_style, cli_style_option::style(), and val_print_not_saved().
Referenced by ada_value_print_array(), cp_print_static_field(), value::fetch_lazy_register(), pascal_object_print_static_field(), pascal_object_print_value_fields(), valprint_check_validity(), value_check_printable(), and value_print_scalar_formatted().
|
static |
Definition at line 343 of file valprint.c.
References val_print_scalar_type_p().
Referenced by common_val_print().
int val_print_scalar_type_p | ( | struct type * | type | ) |
Definition at line 317 of file valprint.c.
References check_typedef(), type::code(), type::target_type(), and TYPE_IS_REFERENCE.
Referenced by common_val_print(), list_arg_or_local(), val_print_scalar_or_string_type_p(), 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 2643 of file valprint.c.
References type::arch(), current_language, err, extract_unsigned_integer(), gdb_printf(), get_print_max_chars(), type::length(), memory_error_message(), metadata_style, language_defn::printstr(), cli_style_option::style(), styled_string(), target_read_memory(), target_read_string(), TARGET_XFER_E_IO, and type_byte_order().
Referenced by fprint_auxv_entry(), lsscm_val_print_lazy_string(), m2_print_array_contents(), print_children(), print_formatted(), print_go_string(), print_string_repr(), print_unpacked_pointer(), print_unpacked_pointer(), rust_val_print_slice(), stpy_str(), f_language::value_print_inner(), pascal_language::value_print_inner(), rust_language::value_print_inner(), and varobj_value_get_print_value().
|
static |
Definition at line 1225 of file valprint.c.
References type::arch(), field::bitsize(), builtin_type::builtin_bool, builtin_type(), type::code(), value::contents_for_printing(), type::field(), gdb_printf(), gdb_puts(), generic_val_print_enum_1(), field::loc_bitpos(), field::name(), type::num_fields(), print_longest(), cli_style_option::style(), styled_string(), field::type(), unpack_long(), and variable_name_style.
Referenced by generic_value_print().
void val_print_unavailable | ( | struct ui_file * | stream | ) |
Definition at line 431 of file valprint.c.
References fprintf_styled(), metadata_style, and cli_style_option::style().
Referenced by cp_print_value(), info_frame_command_core(), pascal_object_print_value(), valprint_check_validity(), value_check_printable(), and value_print_scalar_formatted().
int valprint_check_validity | ( | struct ui_file * | stream, |
struct type * | type, | ||
LONGEST | embedded_offset, | ||
const struct value * | val ) |
Definition at line 353 of file valprint.c.
References value::bits_any_optimized_out(), value::bits_synthetic_pointer(), value::bytes_available(), check_typedef(), type::code(), coerce_ref_if_computed(), value::embedded_offset(), fputs_styled(), type::length(), value::lval(), lval_memory, metadata_style, cli_style_option::style(), type_not_allocated(), type_not_associated(), val_print_not_allocated(), val_print_not_associated(), val_print_optimized_out(), and val_print_unavailable().
Referenced by common_val_print(), and cp_print_value_fields().
|
static |
Definition at line 1123 of file valprint.c.
References type::code(), value::entirely_optimized_out(), value::entirely_unavailable(), fprintf_styled(), gdb_printf(), metadata_style, cli_style_option::style(), value_print_options::summary, value::type(), type_not_allocated(), type_not_associated(), val_print_not_allocated(), val_print_not_associated(), val_print_optimized_out(), val_print_scalar_type_p(), val_print_unavailable(), and value_internal_function_name().
Referenced by common_val_print_checked(), and value_print().
void value_print | ( | struct value * | val, |
struct ui_file * | stream, | ||
const struct value_print_options * | options ) |
Definition at line 1191 of file valprint.c.
References apply_ext_lang_val_pretty_printer(), current_language, value_print_options::raw, value_check_printable(), and language_defn::value_print().
Referenced by check_thread_db_callback(), debug_val(), dwarf2_compute_name(), info_common_command_for_block(), maintenance_print_record_instruction(), print_formatted(), print_return_value_1(), print_scalar_formatted(), shell_internal_fn(), show_convenience(), show_values(), unwind_infopy_str(), and watchpoint_value_print().
void value_print_array_elements | ( | struct value * | val, |
struct ui_file * | stream, | ||
int | recurse, | ||
const struct value_print_options * | options, | ||
unsigned int | i ) |
Definition at line 1941 of file valprint.c.
References annotate_array_section_begin(), annotate_array_section_end(), annotate_elt(), annotate_elt_rep(), annotate_elt_rep_end(), available, type::bit_stride(), check_typedef(), type::code(), common_val_print(), value::contents_eq(), current_language, value::entirely_available(), value::entirely_unavailable(), value::from_component_bitsize(), gdb_printf(), get_array_bounds(), type::index_type(), type::length(), maybe_print_array_index(), metadata_style, value_print_options::prettyformat_arrays, value_print_options::print_max, print_spaces(), ui_file_style::ptr(), value_print_options::repeat_count_threshold, cli_style_option::style(), type::target_type(), value::type(), and ui_file::wrap_here().
Referenced by ada_value_print_array(), c_value_print_array(), generic_val_print_array(), m2_print_array_contents(), m2_language::value_print_inner(), and pascal_language::value_print_inner().
void value_print_scalar_formatted | ( | struct value * | val, |
const struct value_print_options * | options, | ||
int | size, | ||
struct ui_file * | stream ) |
Definition at line 1278 of file valprint.c.
References value::bits_any_optimized_out(), value::bytes_available(), check_typedef(), common_val_print(), value::contents_for_printing(), current_language, value_print_options::format, type::length(), print_scalar_formatted(), size, value::type(), val_print_optimized_out(), and val_print_unavailable().
Referenced by ada_val_print_enum(), ada_value_print_num(), c_value_print_int(), c_value_print_ptr(), generic_val_print_fixed_point(), generic_value_print(), generic_value_print_bool(), generic_value_print_char(), generic_value_print_complex(), generic_value_print_int(), generic_value_print_memberptr(), generic_value_print_ptr(), mips_print_register(), print_formatted(), f_language::value_print_inner(), m2_language::value_print_inner(), and pascal_language::value_print_inner().
|
static |
Definition at line 2077 of file valprint.c.
References gdb_iswprint, and LCST.
Referenced by generic_emit_char().
unsigned input_radix = 10 |
Default radixes for input and output. Only some values supported.
Definition at line 186 of file valprint.c.
Referenced by breakpoint_re_set(), breakpoint_re_set_one(), classify_name(), classify_name(), lex_one_token(), lex_one_token(), lex_one_token(), parse_number(), parse_number(), parse_number(), parse_number(), parse_number(), parse_number(), set_input_radix_1(), show_radix(), varobj_set_value(), yylex(), and yylex().
|
static |
Definition at line 2741 of file valprint.c.
Referenced by set_input_radix(), and set_input_radix_1().
unsigned output_radix = 10 |
Definition at line 196 of file valprint.c.
Referenced by set_output_radix_1(), and show_radix().
|
static |
Definition at line 2782 of file valprint.c.
Referenced by set_output_radix(), and set_output_radix_1().
|
static |
Definition at line 2913 of file valprint.c.
struct cmd_list_element* setprintrawlist |
Definition at line 83 of file valprint.c.
struct cmd_list_element* showprintrawlist |
Definition at line 84 of file valprint.c.
struct value_print_options user_print_options |
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().
|
static |
Definition at line 2922 of file valprint.c.
Referenced by make_value_print_options_def_group().