41 int,
struct type *,
int,
63 struct type *index_type;
76 if (low_bound > high_bound)
124 int bitoffset,
struct ui_file *stream,
130 unsigned int things_printed = 0;
132 struct type *elttype, *index_type;
146 len = high - low + 1;
152 while (i < len && things_printed < options->print_max)
154 struct value *v0, *v1;
214 for (j = i0; j < i; j += 1)
237 things_printed += i - i0;
260 int quoter,
int type_len)
268 if (c <= UCHAR_MAX && isascii (c) && isprint (c))
270 if (c == quoter && c ==
'"')
284 enum bfd_endian byte_order)
290 type_len, byte_order);
307 size_t skip_count = 0;
311 size_t pos = s.find (
"inf");
312 if (pos == std::string::npos)
313 pos = s.find (
"Inf");
314 if (pos == std::string::npos)
315 pos = s.find (
"INF");
316 if (pos != std::string::npos)
317 s.replace (pos, 3,
"Inf");
319 if (pos == std::string::npos)
321 pos = s.find (
"nan");
322 if (pos == std::string::npos)
323 pos = s.find (
"NaN");
324 if (pos == std::string::npos)
325 pos = s.find (
"Nan");
326 if (pos != std::string::npos)
328 s[pos] = s[pos + 2] =
'N';
334 if (pos == std::string::npos
335 && s.find (
'.') == std::string::npos)
338 if (pos == std::string::npos)
378 for (i = 0; i < len; i++)
426 warning (
_(
"internal error: unhandled type in ada_print_scalar"));
430 error (
_(
"Invalid type code in symbol table."));
443 unsigned int length,
int force_ellipses,
int type_len,
448 unsigned int things_printed = 0;
477 &&
char_at (
string, rep1, type_len, byte_order)
478 ==
char_at (
string, i, type_len, byte_order))
493 elttype, stream,
'\'', type_len);
508 elttype, stream,
'"', type_len);
517 if (force_ellipses || i <
length)
524 const char *encoding,
int force_ellipses,
534 struct ui_file *stream,
int recurse,
538 struct type *outer_type,
int outer_offset,
543 valaddr + outer_offset);
553 stream, recurse, val, options,
554 comma_needed, outer_type, outer_offset,
language);
578 struct type *outer_type,
int outer_offset,
585 for (i = 0; i < len; i += 1)
597 stream, recurse, val, options,
605 offset, stream, recurse, val,
606 options, comma_needed,
607 outer_type, outer_offset,
language);
658 stream, recurse + 1, v,
669 0, stream, recurse + 1, val, &opts,
language);
683 struct ui_file *stream,
int recurse,
684 struct value *original_value,
715 &&
char_at (valaddr + offset_aligned,
716 temp_len, eltlen, byte_order) != 0);
721 printstr (stream, elttype, valaddr + offset_aligned, len, 0,
731 struct ui_file *stream,
int recurse,
732 struct value *original_value,
756 stream, recurse, val, options,
language);
766 struct ui_file *stream,
int recurse,
767 struct value *original_value,
778 valaddr + offset_aligned,
793 struct ui_file *stream,
int recurse,
794 struct value *original_value,
831 address, stream, recurse, original_value,
846 original_value, &opts, 0, stream);
869 original_value, options, 0, stream);
889 struct ui_file *stream,
int recurse,
890 struct value *original_value,
901 original_value, options, 0, stream);
907 for (i = 0; i < len; i++)
933 struct ui_file *stream,
int recurse,
934 struct value *original_value,
955 int recurse,
struct value *original_value,
968 stream, recurse, original_value, options,
985 struct ui_file *stream,
int recurse,
986 struct value *original_value,
994 address, stream, recurse, original_value,
1004 original_value, options);
1007 stream, recurse, original_value,
1018 struct ui_file *stream,
int recurse,
1019 struct value *original_value,
1029 struct value *deref_val;
1050 if (deref_val_int == 0)
1083 struct ui_file *stream,
int recurse,
1084 struct value *original_value,
1098 stream, recurse, original_value,
1117 address, stream, recurse, original_value,
1124 address, stream, recurse, original_value,
1130 address, stream, recurse, original_value,
1136 address, stream, recurse, original_value,
1144 original_value, options,
language);
1149 address, stream, recurse, original_value,
1155 address, stream, recurse, original_value,
1167 struct ui_file *stream,
int recurse,
1174 stream, recurse, val, options,
static int char_at(const gdb_byte *string, int i, int type_len, enum bfd_endian byte_order)
static struct type * printable_val_type(struct type *type, const gdb_byte *valaddr)
int ada_is_character_type(struct type *type)
void annotate_field_value(void)
struct value * value_mark(void)
unsigned int repeat_count_threshold
CORE_ADDR extract_typed_address(const gdb_byte *buf, struct type *type)
std::string target_float_to_string(const gdb_byte *addr, const struct type *type, const char *format)
int ada_is_bogus_array_descriptor(struct type *type)
const char * ada_tag_name(struct value *tag)
struct value * value_from_contents_and_address(struct type *type, const gdb_byte *valaddr, CORE_ADDR address)
#define TYPE_FIELD_NAME(thistype, n)
static int print_variant_part(struct type *type, int field_num, const gdb_byte *valaddr, int offset, struct ui_file *stream, int recurse, struct value *val, const struct value_print_options *options, int comma_needed, struct type *outer_type, int outer_offset, const struct language_defn *language)
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)
#define TYPE_LOW_BOUND(range_type)
void ada_value_print(struct value *val0, struct ui_file *stream, const struct value_print_options *options)
static void ada_val_print_1(struct type *type, int offset, CORE_ADDR address, struct ui_file *stream, int recurse, struct value *original_value, const struct value_print_options *options, const struct language_defn *language)
struct value * value_from_contents(struct type *type, const gdb_byte *contents)
CORE_ADDR unpack_pointer(struct type *type, const gdb_byte *valaddr)
void warning(const char *fmt,...)
LONGEST value_embedded_offset(const struct value *value)
struct type * ada_to_fixed_type(struct type *type, const gdb_byte *valaddr, CORE_ADDR address, struct value *dval, int check_tag)
struct type * value_enclosing_type(const struct value *value)
const struct builtin_type * builtin_type(struct gdbarch *gdbarch)
void common_val_print(struct value *val, struct ui_file *stream, int recurse, const struct value_print_options *options, const struct language_defn *language)
const struct language_defn * language_def(enum language lang)
void print_floating(const gdb_byte *valaddr, struct type *type, struct ui_file *stream)
int value_lazy(const struct value *value)
struct value * coerce_ref(struct value *arg)
void type_print(struct type *type, const char *varstring, struct ui_file *stream, int show)
void annotate_field_name_end(void)
const gdb_byte * value_contents_for_printing(struct value *value)
struct type * ada_check_typedef(struct type *type)
#define TYPE_FIELD_ENUMVAL(thistype, n)
#define TYPE_FIELD_TYPE(thistype, n)
enum val_prettyformat prettyformat
const gdb_byte * ada_aligned_value_addr(struct type *type, const gdb_byte *valaddr)
int ada_is_string_type(struct type *type)
void ada_print_scalar(struct type *type, LONGEST val, struct ui_file *stream)
const char * paddress(struct gdbarch *gdbarch, CORE_ADDR addr)
static void ada_val_print_ptr(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, const struct language_defn *language)
struct value * ada_coerce_to_simple_array_ptr(struct value *arr)
void val_print_scalar_formatted(struct type *type, LONGEST embedded_offset, struct value *val, const struct value_print_options *options, int size, struct ui_file *stream)
bool value_contents_eq(const struct value *val1, LONGEST offset1, const struct value *val2, LONGEST offset2, LONGEST length)
struct value * ada_scaling_factor(struct type *type)
struct type * check_typedef(struct type *type)
const gdb_byte * value_contents(struct value *value)
#define CATCH(EXCEPTION, MASK)
void fprintf_filtered(struct ui_file *stream, const char *format,...)
int ada_is_tagged_type(struct type *type, int refok)
static ULONGEST extract_unsigned_integer(const gdb_byte *addr, int len, enum bfd_endian byte_order)
int ada_name_prefix_len(const char *name)
void annotate_elt_rep(unsigned int repcount)
void fputs_filtered(const char *linebuffer, struct ui_file *stream)
int ada_is_system_address_type(struct type *type)
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
#define TYPE_FIELD_IGNORE(thistype, n)
void annotate_array_section_begin(int idx, struct type *elttype)
struct value * coerce_ref_if_computed(const struct value *arg)
int ada_is_wrapper_field(struct type *type, int field_num)
static void ada_val_print_enum(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, const struct language_defn *language)
struct gdbarch * get_type_arch(const struct type *type)
static int print_field_values(struct type *, const gdb_byte *, int, struct ui_file *, int, struct value *, const struct value_print_options *, int, struct type *, int, const struct language_defn *)
struct value * value_cast(struct type *type, struct value *arg2)
int ada_is_array_descriptor_type(struct type *type)
#define TYPE_FIELD_PACKED(thistype, n)
static void ada_val_print_num(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, const struct language_defn *language)
#define TYPE_FIELD_BITSIZE(thistype, n)
void annotate_elt_rep_end(void)
LONGEST unpack_long(struct type *type, const gdb_byte *valaddr)
#define TYPE_FIELD_BITPOS(thistype, n)
int ada_is_constrained_packed_array_type(struct type *type)
static void ada_val_print_struct_union(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, const struct language_defn *language)
struct value * ada_tag_value_at_base_address(struct value *obj)
void annotate_array_section_end(void)
int ada_is_tag_type(struct type *type)
static void val_print_packed_array_elements(struct type *type, const gdb_byte *valaddr, int offset, int bitoffset, struct ui_file *stream, int recurse, struct value *val, const struct value_print_options *options)
void wrap_here(const char *indent)
int ada_is_fixed_point_type(struct type *type)
int ada_which_variant_applies(struct type *var_type, struct type *outer_type, const gdb_byte *outer_valaddr)
int ada_is_ignored_field(struct type *type, int field_num)
void print_spaces_filtered(int n, struct ui_file *stream)
static void ada_val_print_gnat_array(struct type *type, const gdb_byte *valaddr, int offset, CORE_ADDR address, struct ui_file *stream, int recurse, struct value *original_value, const struct value_print_options *options, const struct language_defn *language)
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, const struct language_defn *language)
struct value * value_from_pointer(struct type *type, CORE_ADDR addr)
const struct language_defn * current_language
static void ada_print_floating(const gdb_byte *valaddr, struct type *type, struct ui_file *stream)
#define TYPE_TARGET_TYPE(thistype)
void print_longest(struct ui_file *stream, int format, int use_c_format, LONGEST val_long)
void value_fetch_lazy(struct value *val)
struct type * ada_aligned_type(struct type *type)
void ada_emit_char(int c, struct type *type, struct ui_file *stream, int quoter, int type_len)
#define TYPE_CODE(thistype)
#define TYPE_INDEX_TYPE(type)
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)
struct type * resolve_dynamic_type(struct type *type, const gdb_byte *valaddr, CORE_ADDR addr)
struct type * builtin_data_ptr
struct value * ada_coerce_to_simple_array(struct value *arr)
#define HAVE_CPLUS_STRUCT(type)
int ada_is_variant_part(struct type *type, int field_num)
#define TYPE_NFIELDS(thistype)
struct value * ada_value_ind(struct value *val0)
static void ada_val_print_string(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 value_free_to_mark(const struct value *mark)
struct value * value_binop(struct value *arg1, struct value *arg2, enum exp_opcode op)
void val_print(struct type *type, LONGEST embedded_offset, CORE_ADDR address, struct ui_file *stream, int recurse, struct value *val, const struct value_print_options *options, const struct language_defn *language)
void annotate_field_end(void)
const char * ada_enum_name(const char *name)
static void adjust_type_signedness(struct type *type)
struct type * value_type(const struct value *value)
void ada_printchar(int c, struct type *type, struct ui_file *stream)
void ada_ensure_varsize_limit(const struct type *type)
struct value * ada_to_fixed_value(struct value *val)
#define TYPE_LENGTH(thistype)
#define LA_PRINT_CHAR(ch, type, stream)
void gdb_flush(struct ui_file *file)
void val_print_array_elements(struct type *type, LONGEST embedded_offset, CORE_ADDR address, struct ui_file *stream, int recurse, struct value *val, const struct value_print_options *options, unsigned int i)
CORE_ADDR value_address(const struct value *value)
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 int print_optional_low_bound(struct ui_file *stream, struct type *type, const struct value_print_options *options)
int get_array_bounds(struct type *type, LONGEST *low_bound, LONGEST *high_bound)
int get_discrete_bounds(struct type *type, LONGEST *lowp, LONGEST *highp)
void error(const char *fmt,...)
void maybe_print_array_index(struct type *index_type, LONGEST index, struct ui_file *stream, const struct value_print_options *options)
void ada_val_print(struct type *type, int embedded_offset, CORE_ADDR address, struct ui_file *stream, int recurse, struct value *val, const struct value_print_options *options)
struct type * lookup_pointer_type(struct type *type)
void annotate_field_begin(struct type *type)
static void ada_val_print_flt(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, const struct language_defn *language)
static void ada_val_print_array(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)