71 if (low_bound > high_bound)
121 int offset,
struct ui_file *stream,
126 unsigned int things_printed = 0;
151 len = high - low + 1;
160 while (i < len && things_printed < options->print_max)
162 struct value *v0, *v1;
187 (i0 *
bitsize) / HOST_CHAR_BIT,
188 (i0 *
bitsize) % HOST_CHAR_BIT,
215 gdb_printf (stream, _(
" %p[<repeats %u times>%p]"),
226 for (j = i0; j < i; j += 1)
248 things_printed += i - i0;
263 int quoter,
int type_len)
271 if (c <= UCHAR_MAX && isascii (c) && isprint (c))
273 if (c == quoter && c ==
'"')
282 gdb_printf (stream,
"[\"%0*x\"]", std::min (6, type_len * 2), c);
290char_at (
const gdb_byte *
string,
int i,
int type_len,
291 enum bfd_endian byte_order)
297 type_len, byte_order);
313 std::string s = tmp_stream.
release ();
314 size_t skip_count = 0;
325 size_t pos = s.find (
"inf");
326 if (pos == std::string::npos)
327 pos = s.find (
"Inf");
328 if (pos == std::string::npos)
329 pos = s.find (
"INF");
330 if (pos != std::string::npos)
331 s.replace (pos, 3,
"Inf");
333 if (pos == std::string::npos)
335 pos = s.find (
"nan");
336 if (pos == std::string::npos)
337 pos = s.find (
"NaN");
338 if (pos == std::string::npos)
339 pos = s.find (
"Nan");
340 if (pos != std::string::npos)
342 s[pos] = s[pos + 2] =
'N';
348 if (pos == std::string::npos
349 && s.find (
'.') == std::string::npos)
352 if (pos == std::string::npos)
355 gdb_printf (stream,
"%.*s.0%s", (
int) pos, s.c_str (), &s[pos]);
392 for (i = 0; i < len; i++)
422 case TYPE_CODE_RANGE:
428 case TYPE_CODE_ARRAY:
429 case TYPE_CODE_STRUCT:
430 case TYPE_CODE_UNION:
435 case TYPE_CODE_STRING:
436 case TYPE_CODE_ERROR:
437 case TYPE_CODE_MEMBERPTR:
438 case TYPE_CODE_METHODPTR:
439 case TYPE_CODE_METHOD:
441 warning (_(
"internal error: unhandled type in ada_print_scalar"));
445 error (_(
"Invalid type code in symbol table."));
457 unsigned int length,
int force_ellipses,
int type_len,
462 unsigned int things_printed = 0;
472 for (i = 0; i < length && things_printed < options->
print_max; i += 1)
491 &&
char_at (
string, rep1, type_len, byte_order)
492 ==
char_at (
string, i, type_len, byte_order))
507 elttype, stream,
'\'', type_len);
509 gdb_printf (stream, _(
" %p[<repeats %u times>%p]"),
523 elttype, stream,
'"', type_len);
532 if (force_ellipses || i < length)
538 const gdb_byte *
string,
unsigned int length,
539 const char *encoding,
int force_ellipses,
548 struct value *outer_value,
549 struct ui_file *stream,
int recurse,
583 struct ui_file *stream,
int recurse,
593 for (i = 0; i < len; i += 1)
604 stream, recurse, options,
657 bit_pos / HOST_CHAR_BIT,
658 bit_pos % HOST_CHAR_BIT,
686 struct ui_file *stream,
int recurse,
698 gdb_assert (elttype != NULL);
699 gdb_assert (elttype->
length () != 0);
701 eltlen = elttype->
length ();
714 &&
char_at (valaddr + offset_aligned,
715 temp_len, eltlen, byte_order) != 0);
720 printstr (stream, elttype, valaddr + offset_aligned, len, 0,
729 struct ui_file *stream,
int recurse,
762 if (
type->
code () == TYPE_CODE_RANGE
845 for (i = 0; i < len; i++)
926 stream, recurse, options);
938 int offset,
int offset_aligned, CORE_ADDR address,
939 struct ui_file *stream,
int recurse,
940 struct value *original_value,
949 struct value *deref_val;
950 CORE_ADDR deref_val_int;
971 if (deref_val_int == 0)
1002 &&
type->
code () != TYPE_CODE_PTR))
1011 gdb_assert (
type->
code () == TYPE_CODE_TYPEDEF);
1024 gdb::array_view<const gdb_byte> view
1025 = gdb::make_array_view (valaddr,
type->
length ());
1027 if (
type != saved_type)
1048 case TYPE_CODE_RANGE:
1052 case TYPE_CODE_ENUM:
1067 case TYPE_CODE_UNION:
1068 case TYPE_CODE_STRUCT:
1072 case TYPE_CODE_ARRAY:
1078 address, stream, recurse, val,
1114 if (
type->
code () == TYPE_CODE_TYPEDEF)
struct value * ada_value_primitive_packed_val(struct value *obj, const gdb_byte *valaddr, long offset, int bit_offset, int bit_size, struct type *type)
const gdb_byte * ada_aligned_value_addr(struct type *type, const gdb_byte *valaddr)
struct value * ada_get_decoded_value(struct value *value)
int ada_is_variant_part(struct type *type, int field_num)
int ada_which_variant_applies(struct type *var_type, struct value *outer)
bool ada_is_string_type(struct type *type)
int ada_is_array_descriptor_type(struct type *type)
bool ada_is_character_type(struct type *type)
int ada_is_system_address_type(struct type *type)
int ada_is_constrained_packed_array_type(struct type *type)
int ada_name_prefix_len(const char *name)
struct value * ada_tag_value_at_base_address(struct value *obj)
struct type * ada_check_typedef(struct type *type)
int ada_is_wrapper_field(struct type *type, int field_num)
int ada_is_tagged_type(struct type *type, int refok)
int ada_is_tag_type(struct type *type)
struct value * ada_value_ind(struct value *val0)
const char * ada_enum_name(const char *name)
int ada_is_bogus_array_descriptor(struct type *type)
struct value * ada_value_primitive_field(struct value *arg1, int offset, int fieldno, struct type *arg_type)
int ada_is_ignored_field(struct type *type, int field_num)
gdb::unique_xmalloc_ptr< char > ada_tag_name(struct value *tag)
struct value * ada_to_fixed_value(struct value *val)
static int print_variant_part(struct value *value, int field_num, struct value *outer_value, struct ui_file *stream, int recurse, const struct value_print_options *options, int comma_needed, const struct language_defn *language)
void ada_printchar(int c, struct type *type, struct ui_file *stream)
static int print_optional_low_bound(struct ui_file *stream, struct type *type, const struct value_print_options *options)
void ada_print_scalar(struct type *type, LONGEST val, struct ui_file *stream)
void ada_value_print_inner(struct value *val, struct ui_file *stream, int recurse, const struct value_print_options *options)
static void adjust_type_signedness(struct type *type)
void ada_value_print(struct value *val0, struct ui_file *stream, const struct value_print_options *options)
static int char_at(const gdb_byte *string, int i, int type_len, enum bfd_endian byte_order)
static void printstr(struct ui_file *stream, struct type *elttype, const gdb_byte *string, unsigned int length, int force_ellipses, int type_len, const struct value_print_options *options)
static void val_print_packed_array_elements(struct type *type, const gdb_byte *valaddr, int offset, struct ui_file *stream, int recurse, const struct value_print_options *options)
static int print_field_values(struct value *, struct value *, struct ui_file *, int, const struct value_print_options *, int, const struct language_defn *)
static void ada_val_print_enum(struct value *value, struct ui_file *stream, int recurse, const struct value_print_options *options)
static void ada_value_print_ptr(struct value *val, struct ui_file *stream, int recurse, const struct value_print_options *options)
static void ada_val_print_string(struct type *type, const gdb_byte *valaddr, int offset_aligned, struct ui_file *stream, int recurse, const struct value_print_options *options)
void ada_printstr(struct ui_file *stream, struct type *type, const gdb_byte *string, unsigned int length, const char *encoding, int force_ellipses, const struct value_print_options *options)
static void ada_print_floating(const gdb_byte *valaddr, struct type *type, struct ui_file *stream)
static void ada_value_print_array(struct value *val, struct ui_file *stream, int recurse, const struct value_print_options *options)
static void ada_val_print_ref(struct type *type, const gdb_byte *valaddr, int offset, int offset_aligned, CORE_ADDR address, struct ui_file *stream, int recurse, struct value *original_value, const struct value_print_options *options)
void ada_emit_char(int c, struct type *type, struct ui_file *stream, int quoter, int type_len)
static void ada_value_print_num(struct value *val, struct ui_file *stream, int recurse, const struct value_print_options *options)
static void ada_val_print_struct_union(struct value *value, struct ui_file *stream, int recurse, const struct value_print_options *options)
void annotate_field_value(void)
void annotate_field_begin(struct type *type)
void annotate_field_name_end(void)
void annotate_elt_rep_end(void)
void annotate_array_section_begin(int idx, struct type *elttype)
void annotate_array_section_end(void)
void annotate_elt_rep(unsigned int repcount)
void annotate_field_end(void)
ui_file_style style() const
virtual void wrap_here(int indent)
cli_style_option variable_name_style
cli_style_option metadata_style
CORE_ADDR extract_typed_address(const gdb_byte *buf, struct type *type)
static ULONGEST extract_unsigned_integer(gdb::array_view< const gdb_byte > buf, enum bfd_endian byte_order)
struct type * resolve_dynamic_type(struct type *type, gdb::array_view< const gdb_byte > valaddr, CORE_ADDR addr)
enum bfd_endian type_byte_order(const struct type *type)
struct type * lookup_pointer_type(struct type *type)
bool get_discrete_bounds(struct type *type, LONGEST *lowp, LONGEST *highp)
bool get_array_bounds(struct type *type, LONGEST *low_bound, LONGEST *high_bound)
bool is_fixed_point_type(struct type *type)
struct type * check_typedef(struct type *type)
#define TYPE_FIELD_IGNORE(thistype, n)
#define HAVE_CPLUS_STRUCT(type)
#define TYPE_FIELD_BITSIZE(thistype, n)
#define TYPE_FIELD_PACKED(thistype, n)
const struct language_defn * language_def(enum language lang)
const struct language_defn * current_language
struct type * builtin_data_ptr
LONGEST const_val() const
LONGEST loc_bitpos() const
LONGEST loc_enumval() const
const char * name() const
struct type * type() const
virtual void printchar(int ch, struct type *chtype, struct ui_file *stream) const
struct type * target_type() const
struct field & field(int idx) const
void set_is_unsigned(bool is_unsigned)
range_bounds * bounds() const
type * index_type() const
struct type * fixed_point_type_base_type()
const ui_file_style * ptr() const
enum val_prettyformat prettyformat
unsigned int repeat_count_threshold
void type_print(struct type *type, const char *varstring, struct ui_file *stream, int show)
static styled_string_s * styled_string(const ui_file_style &style, const char *str, styled_string_s &&tmp={})
const char * paddress(struct gdbarch *gdbarch, CORE_ADDR addr)
void print_spaces(int n, struct ui_file *stream)
void gdb_printf(struct ui_file *stream, const char *format,...)
void fputs_styled(const char *linebuffer, const ui_file_style &style, struct ui_file *stream)
void gdb_puts(const char *linebuffer, struct ui_file *stream)
struct value * value_cast(struct type *type, struct value *arg2)
void value_print_scalar_formatted(struct value *val, const struct value_print_options *options, int size, struct ui_file *stream)
void val_print_optimized_out(const struct value *val, struct ui_file *stream)
void print_floating(const gdb_byte *valaddr, struct type *type, struct ui_file *stream)
void value_print_array_elements(struct value *val, struct ui_file *stream, int recurse, const struct value_print_options *options, unsigned int i)
void print_longest(struct ui_file *stream, int format, int use_c_format, LONGEST val_long)
void common_val_print(struct value *value, struct ui_file *stream, int recurse, const struct value_print_options *options, const struct language_defn *language)
void maybe_print_array_index(struct type *index_type, LONGEST index, struct ui_file *stream, const struct value_print_options *options)
struct type * value_type(const struct value *value)
int value_entirely_optimized_out(struct value *value)
LONGEST value_embedded_offset(const struct value *value)
struct value * coerce_ref_if_computed(const struct value *arg)
int value_lazy(const struct value *value)
struct value * value_field(struct value *arg1, int fieldno)
CORE_ADDR unpack_pointer(struct type *type, const gdb_byte *valaddr)
void value_fetch_lazy(struct value *val)
CORE_ADDR value_address(const struct value *value)
struct value * coerce_ref(struct value *arg)
bool value_contents_eq(const struct value *val1, LONGEST offset1, const struct value *val2, LONGEST offset2, LONGEST length)
struct value * value_copy(const value *arg)
gdb::array_view< const gdb_byte > value_contents_for_printing(struct value *value)
struct value * value_from_pointer(struct type *type, CORE_ADDR addr)
void deprecated_set_value_type(struct value *value, struct type *type)
LONGEST unpack_long(struct type *type, const gdb_byte *valaddr)