40 int,
struct type *,
int,
62 struct type *index_type;
75 if (low_bound > high_bound)
123 int bitoffset,
struct ui_file *stream,
125 const struct value *val,
129 unsigned int things_printed = 0;
131 struct type *elttype, *index_type;
145 len = high - low + 1;
151 while (i < len && things_printed < options->print_max)
153 struct value *v0, *v1;
182 (i * bitsize) / HOST_CHAR_BIT,
183 (i * bitsize) % HOST_CHAR_BIT,
213 for (j = i0; j < i; j += 1)
236 things_printed += i - i0;
259 int quoter,
int type_len)
267 if (c <= UCHAR_MAX && isascii (c) && isprint (c))
269 if (c == quoter && c ==
'"')
283 enum bfd_endian byte_order)
289 type_len, byte_order);
311 s = strstr (result,
"inf");
313 s = strstr (result,
"Inf");
315 s = strstr (result,
"INF");
321 s = strstr (result,
"nan");
323 s = strstr (result,
"NaN");
325 s = strstr (result,
"Nan");
329 if (result[0] ==
'-')
334 if (s == NULL && strchr (result,
'.') == NULL)
336 s = strchr (result,
'e');
379 for (i = 0; i <
len; i++)
427 warning (
_(
"internal error: unhandled type in ada_print_scalar"));
431 error (
_(
"Invalid type code in symbol table."));
444 unsigned int length,
int force_ellipses,
int type_len,
449 unsigned int things_printed = 0;
459 for (i = 0; i < length && things_printed < options->
print_max; i += 1)
478 &&
char_at (
string, rep1, type_len, byte_order)
479 ==
char_at (
string, i, type_len, byte_order))
494 elttype, stream,
'\'', type_len);
509 elttype, stream,
'"', type_len);
518 if (force_ellipses || i < length)
524 const gdb_byte *
string,
unsigned int length,
525 const char *
encoding,
int force_ellipses,
534 const gdb_byte *valaddr,
int offset,
535 struct ui_file *stream,
int recurse,
536 const struct value *val,
539 struct type *outer_type,
int outer_offset,
544 valaddr + outer_offset);
554 stream, recurse, val, options,
555 comma_needed, outer_type, outer_offset, language);
575 int offset,
struct ui_file *stream,
int recurse,
576 const struct value *val,
579 struct type *outer_type,
int outer_offset,
586 for (i = 0; i <
len; i += 1)
598 stream, recurse, val, options,
599 comma_needed, type, offset, language);
606 offset, stream, recurse, val,
607 options, comma_needed,
608 outer_type, outer_offset, language);
661 stream, recurse + 1, v,
672 0, stream, recurse + 1, val, &opts, language);
685 int offset,
int offset_aligned,
CORE_ADDR address,
686 struct ui_file *stream,
int recurse,
687 const struct value *original_value,
718 &&
char_at (valaddr + offset_aligned,
719 temp_len, eltlen, byte_order) != 0);
724 printstr (stream, elttype, valaddr + offset_aligned, len, 0,
734 struct ui_file *stream,
int recurse,
735 const struct value *original_value,
759 stream, recurse, val, options, language);
768 int offset,
int offset_aligned,
CORE_ADDR address,
769 struct ui_file *stream,
int recurse,
770 const struct value *original_value,
774 val_print (type, valaddr, offset, address, stream, recurse,
781 valaddr + offset_aligned,
782 address + offset_aligned);
795 int offset,
int offset_aligned,
CORE_ADDR address,
796 struct ui_file *stream,
int recurse,
797 const struct value *original_value,
825 recurse + 1, v, options, language);
829 address, stream, recurse, original_value,
844 original_value, &opts, 0, stream);
885 int offset,
int offset_aligned,
CORE_ADDR address,
886 struct ui_file *stream,
int recurse,
887 const struct value *original_value,
898 original_value, options, 0, stream);
903 val =
unpack_long (type, valaddr + offset_aligned);
904 for (i = 0; i <
len; i++)
929 int offset,
int offset_aligned,
CORE_ADDR address,
930 struct ui_file *stream,
int recurse,
931 const struct value *original_value,
937 val_print (type, valaddr, offset, address, stream, recurse,
950 (
struct type *type,
const gdb_byte *valaddr,
int offset,
952 int recurse,
const struct value *original_value,
965 stream, recurse, original_value, options,
966 0, type, offset_aligned, language) != 0
981 int offset,
int offset_aligned,
CORE_ADDR address,
982 struct ui_file *stream,
int recurse,
983 const struct value *original_value,
991 address, stream, recurse, original_value,
1001 original_value, options);
1004 stream, recurse, original_value,
1014 int offset,
int offset_aligned,
CORE_ADDR address,
1015 struct ui_file *stream,
int recurse,
1016 const struct value *original_value,
1026 struct value *deref_val;
1047 if (deref_val_int == 0)
1069 deref_val, options, language);
1078 struct ui_file *stream,
int recurse,
1079 const struct value *original_value,
1092 stream, recurse, original_value,
1100 address + offset_aligned);
1105 val_print (type, valaddr, offset, address, stream, recurse,
1111 address, stream, recurse, original_value,
1118 address, stream, recurse, original_value,
1124 address, stream, recurse, original_value,
1130 address, stream, recurse, original_value,
1137 address, stream, recurse,
1138 original_value, options, language);
1143 address, stream, recurse, original_value,
1149 address, stream, recurse, original_value,
1161 struct ui_file *stream,
int recurse,
1162 const struct value *val,
1170 stream, recurse, val, options,
static int char_at(const gdb_byte *string, int i, int type_len, enum bfd_endian byte_order)
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)
static struct type * printable_val_type(struct type *type, const gdb_byte *valaddr)
ULONGEST extract_unsigned_integer(const gdb_byte *, int, enum bfd_endian)
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)
int ada_is_bogus_array_descriptor(struct type *type)
void value_free_to_mark(struct value *mark)
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)
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)
CORE_ADDR unpack_pointer(struct type *type, const gdb_byte *valaddr)
void warning(const char *fmt,...)
struct type * ada_to_fixed_type(struct type *type, const gdb_byte *valaddr, CORE_ADDR address, struct value *dval, int check_tag)
char * ui_file_xstrdup(struct ui_file *file, long *length)
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 val_print_type_code_int(struct type *type, const gdb_byte *valaddr, struct ui_file *stream)
void print_floating(const gdb_byte *valaddr, struct type *type, struct ui_file *stream)
static int print_field_values(struct type *, const gdb_byte *, int, struct ui_file *, int, const struct value *, const struct value_print_options *, int, struct type *, int, const struct language_defn *)
struct value * coerce_ref(struct value *arg)
static void val_print_packed_array_elements(struct type *type, const gdb_byte *valaddr, int offset, int bitoffset, struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options)
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)
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, const struct value *original_value, const struct value_print_options *options, const struct language_defn *language)
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)
struct value * ada_coerce_to_simple_array_ptr(struct value *arr)
struct type * check_typedef(struct type *type)
#define CATCH(EXCEPTION, MASK)
void ada_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)
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, const struct value *original_value, const struct value_print_options *options, const struct language_defn *language)
void fprintf_filtered(struct ui_file *stream, const char *format,...)
int ada_is_tagged_type(struct type *type, int refok)
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 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)
struct type * value_enclosing_type(struct value *value)
enum bfd_endian gdbarch_byte_order(struct gdbarch *gdbarch)
struct cleanup * make_cleanup(make_cleanup_ftype *function, void *arg)
#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)
struct gdbarch * get_type_arch(const struct type *type)
struct value * value_cast(struct type *type, struct value *arg2)
int ada_is_array_descriptor_type(struct type *type)
void wrap_here(char *indent)
#define TYPE_FIELD_PACKED(thistype, n)
struct ui_file * mem_fileopen(void)
#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)
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)
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, const 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)
int value_contents_eq(const struct value *val1, int offset1, const struct value *val2, int offset2, int length)
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)
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)
struct cleanup * make_cleanup_ui_file_delete(struct ui_file *arg)
#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_enum(struct type *type, const gdb_byte *valaddr, int offset, int offset_aligned, CORE_ADDR address, struct ui_file *stream, int recurse, const 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, const struct value *original_value, const struct value_print_options *options)
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, const struct value *original_value, const struct value_print_options *options)
static int print_variant_part(struct type *type, int field_num, const gdb_byte *valaddr, int offset, struct ui_file *stream, int recurse, const struct value *val, const struct value_print_options *options, int comma_needed, struct type *outer_type, int outer_offset, 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)
int value_embedded_offset(struct value *value)
struct type * value_type(const struct value *value)
void ada_printchar(int c, struct type *type, struct ui_file *stream)
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, const struct value *original_value, const struct value_print_options *options, const struct language_defn *language)
void ada_ensure_varsize_limit(const struct type *type)
DOUBLEST ada_fixed_to_float(struct type *type, LONGEST x)
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)
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, const struct value *original_value, const struct value_print_options *options, const struct language_defn *language)
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 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)
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)
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, const struct value *original_value, const struct value_print_options *options, const struct language_defn *language)
static void ada_val_print_1(struct type *type, const gdb_byte *valaddr, int offset, CORE_ADDR address, struct ui_file *stream, int recurse, const struct value *original_value, const struct value_print_options *options, const struct language_defn *language)
struct type * lookup_pointer_type(struct type *type)
void annotate_field_begin(struct type *type)
void do_cleanups(struct cleanup *old_chain)
const ULONGEST const LONGEST len