1 /* Support for printing Ada values for GDB, the GNU debugger.
2 Copyright 1986, 1988, 1989, 1991, 1992, 1993, 1994, 1997, 2001
3 Free Software Foundation, Inc.
5 This file is part of GDB.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
25 #include "expression.h"
35 /* Encapsulates arguments to ada_val_print. */
36 struct ada_val_print_args
42 struct ui_file *stream;
46 enum val_prettyprint pretty;
49 static void print_record (struct type *, char *, struct ui_file *, int,
50 int, enum val_prettyprint);
52 static int print_field_values (struct type *, char *, struct ui_file *,
53 int, int, enum val_prettyprint,
54 int, struct type *, char *);
56 static int print_variant_part (struct type *, int, char *,
57 struct ui_file *, int, int,
58 enum val_prettyprint, int, struct type *,
61 static void val_print_packed_array_elements (struct type *, char *valaddr,
62 int, struct ui_file *, int, int,
63 enum val_prettyprint);
65 static void adjust_type_signedness (struct type *);
67 static int ada_val_print_stub (void *args0);
69 static int ada_val_print_1 (struct type *, char *, int, CORE_ADDR,
70 struct ui_file *, int, int, int,
71 enum val_prettyprint);
74 /* Make TYPE unsigned if its range of values includes no negatives. */
76 adjust_type_signedness (struct type *type)
78 if (type != NULL && TYPE_CODE (type) == TYPE_CODE_RANGE
79 && TYPE_LOW_BOUND (type) >= 0)
80 TYPE_FLAGS (type) |= TYPE_FLAG_UNSIGNED;
83 /* Assuming TYPE is a simple array type, prints its lower bound on STREAM,
84 if non-standard (i.e., other than 1 for numbers, other than lower bound
85 of index type for enumerated type). Returns 1 if something printed,
89 print_optional_low_bound (struct ui_file *stream, struct type *type)
91 struct type *index_type;
94 index_type = TYPE_INDEX_TYPE (type);
97 if (index_type == NULL)
99 if (TYPE_CODE (index_type) == TYPE_CODE_RANGE)
101 low_bound = TYPE_LOW_BOUND (index_type);
102 index_type = TYPE_TARGET_TYPE (index_type);
107 switch (TYPE_CODE (index_type))
110 if (low_bound == TYPE_FIELD_BITPOS (index_type, 0))
113 case TYPE_CODE_UNDEF:
114 index_type = builtin_type_long;
122 ada_print_scalar (index_type, (LONGEST) low_bound, stream);
123 fprintf_filtered (stream, " => ");
127 /* Version of val_print_array_elements for GNAT-style packed arrays.
128 Prints elements of packed array of type TYPE at bit offset
129 BITOFFSET from VALADDR on STREAM. Formats according to FORMAT and
130 separates with commas. RECURSE is the recursion (nesting) level.
131 If PRETTY, uses "prettier" format. TYPE must have been decoded (as
132 by ada_coerce_to_simple_array). */
135 val_print_packed_array_elements (struct type *type, char *valaddr,
136 int bitoffset, struct ui_file *stream,
137 int format, int recurse,
138 enum val_prettyprint pretty)
141 unsigned int things_printed = 0;
143 struct type *elttype;
145 /* Position of the array element we are examining to see
146 whether it is repeated. */
148 /* Number of repetitions we have detected so far. */
150 unsigned long bitsize = TYPE_FIELD_BITSIZE (type, 0);
151 struct value *mark = value_mark ();
153 elttype = TYPE_TARGET_TYPE (type);
154 eltlen = TYPE_LENGTH (check_typedef (elttype));
158 if (get_discrete_bounds (TYPE_FIELD_TYPE (type, 0), &low, &high) < 0)
161 len = high - low + 1;
165 annotate_array_section_begin (i, elttype);
167 while (i < len && things_printed < print_max)
169 struct value *v0, *v1;
174 if (prettyprint_arrays)
176 fprintf_filtered (stream, ",\n");
177 print_spaces_filtered (2 + 2 * recurse, stream);
181 fprintf_filtered (stream, ", ");
184 wrap_here (n_spaces (2 + 2 * recurse));
187 v0 = ada_value_primitive_packed_val (NULL, valaddr,
188 (i0 * bitsize) / HOST_CHAR_BIT,
189 (i0 * bitsize) % HOST_CHAR_BIT,
196 v1 = ada_value_primitive_packed_val (NULL, valaddr,
197 (i * bitsize) / HOST_CHAR_BIT,
198 (i * bitsize) % HOST_CHAR_BIT,
200 if (memcmp (VALUE_CONTENTS (v0), VALUE_CONTENTS (v1), eltlen) != 0)
204 if (i - i0 > repeat_count_threshold)
206 val_print (elttype, VALUE_CONTENTS (v0), 0, 0, stream, format,
207 0, recurse + 1, pretty);
208 annotate_elt_rep (i - i0);
209 fprintf_filtered (stream, " <repeats %u times>", i - i0);
210 annotate_elt_rep_end ();
216 for (j = i0; j < i; j += 1)
220 if (prettyprint_arrays)
222 fprintf_filtered (stream, ",\n");
223 print_spaces_filtered (2 + 2 * recurse, stream);
227 fprintf_filtered (stream, ", ");
229 wrap_here (n_spaces (2 + 2 * recurse));
231 val_print (elttype, VALUE_CONTENTS (v0), 0, 0, stream, format,
232 0, recurse + 1, pretty);
236 things_printed += i - i0;
238 annotate_array_section_end ();
241 fprintf_filtered (stream, "...");
244 value_free_to_mark (mark);
248 printable_val_type (struct type *type, char *valaddr)
250 return ada_to_fixed_type (ada_aligned_type (type), valaddr, 0, NULL);
253 /* Print the character C on STREAM as part of the contents of a literal
254 string whose delimiter is QUOTER. TYPE_LEN is the length in bytes
255 (1 or 2) of the character. */
258 ada_emit_char (int c, struct ui_file *stream, int quoter, int type_len)
263 c &= (1 << (type_len * TARGET_CHAR_BIT)) - 1;
265 if (isascii (c) && isprint (c))
267 if (c == quoter && c == '"')
268 fprintf_filtered (stream, "[\"%c\"]", quoter);
270 fprintf_filtered (stream, "%c", c);
273 fprintf_filtered (stream, "[\"%0*x\"]", type_len * 2, c);
276 /* Character #I of STRING, given that TYPE_LEN is the size in bytes (1
277 or 2) of a character. */
280 char_at (char *string, int i, int type_len)
285 return (int) extract_unsigned_integer (string + 2 * i, 2);
289 ada_printchar (int c, struct ui_file *stream)
291 fputs_filtered ("'", stream);
292 ada_emit_char (c, stream, '\'', 1);
293 fputs_filtered ("'", stream);
296 /* [From print_type_scalar in typeprint.c]. Print VAL on STREAM in a
297 form appropriate for TYPE. */
300 ada_print_scalar (struct type *type, LONGEST val, struct ui_file *stream)
305 CHECK_TYPEDEF (type);
307 switch (TYPE_CODE (type))
311 len = TYPE_NFIELDS (type);
312 for (i = 0; i < len; i++)
314 if (TYPE_FIELD_BITPOS (type, i) == val)
321 fputs_filtered (ada_enum_name (TYPE_FIELD_NAME (type, i)), stream);
325 print_longest (stream, 'd', 0, val);
330 print_longest (stream, TYPE_UNSIGNED (type) ? 'u' : 'd', 0, val);
334 LA_PRINT_CHAR ((unsigned char) val, stream);
338 fprintf_filtered (stream, val ? "true" : "false");
341 case TYPE_CODE_RANGE:
342 ada_print_scalar (TYPE_TARGET_TYPE (type), val, stream);
345 case TYPE_CODE_UNDEF:
347 case TYPE_CODE_ARRAY:
348 case TYPE_CODE_STRUCT:
349 case TYPE_CODE_UNION:
354 case TYPE_CODE_STRING:
355 case TYPE_CODE_ERROR:
356 case TYPE_CODE_MEMBER:
357 case TYPE_CODE_METHOD:
359 warning ("internal error: unhandled type in ada_print_scalar");
363 error ("Invalid type code in symbol table.");
368 /* Print the character string STRING, printing at most LENGTH characters.
369 Printing stops early if the number hits print_max; repeat counts
370 are printed as appropriate. Print ellipses at the end if we
371 had to stop before printing LENGTH characters, or if
372 FORCE_ELLIPSES. TYPE_LEN is the length (1 or 2) of the character type.
376 printstr (struct ui_file *stream, char *string, unsigned int length,
377 int force_ellipses, int type_len)
380 unsigned int things_printed = 0;
386 fputs_filtered ("\"\"", stream);
390 for (i = 0; i < length && things_printed < print_max; i += 1)
392 /* Position of the character we are examining
393 to see whether it is repeated. */
395 /* Number of repetitions we have detected so far. */
402 fputs_filtered (", ", stream);
408 while (rep1 < length &&
409 char_at (string, rep1, type_len) == char_at (string, i,
416 if (reps > repeat_count_threshold)
421 fputs_filtered ("\\\", ", stream);
423 fputs_filtered ("\", ", stream);
426 fputs_filtered ("'", stream);
427 ada_emit_char (char_at (string, i, type_len), stream, '\'',
429 fputs_filtered ("'", stream);
430 fprintf_filtered (stream, " <repeats %u times>", reps);
432 things_printed += repeat_count_threshold;
440 fputs_filtered ("\\\"", stream);
442 fputs_filtered ("\"", stream);
445 ada_emit_char (char_at (string, i, type_len), stream, '"',
451 /* Terminate the quotes if necessary. */
455 fputs_filtered ("\\\"", stream);
457 fputs_filtered ("\"", stream);
460 if (force_ellipses || i < length)
461 fputs_filtered ("...", stream);
465 ada_printstr (struct ui_file *stream, char *string, unsigned int length,
466 int force_ellipses, int width)
468 printstr (stream, string, length, force_ellipses, width);
472 /* Print data of type TYPE located at VALADDR (within GDB), which came from
473 the inferior at address ADDRESS, onto stdio stream STREAM according to
474 FORMAT (a letter as for the printf % codes or 0 for natural format).
475 The data at VALADDR is in target byte order.
477 If the data is printed as a string, returns the number of string characters
480 If DEREF_REF is nonzero, then dereference references, otherwise just print
483 RECURSE indicates the amount of indentation to supply before
484 continuation lines; this amount is roughly twice the value of RECURSE.
486 When PRETTY is non-zero, prints record fields on separate lines.
487 (For some reason, the current version of gdb instead uses a global
488 variable---prettyprint_arrays--- to causes a similar effect on
492 ada_val_print (struct type *type, char *valaddr0, int embedded_offset,
493 CORE_ADDR address, struct ui_file *stream, int format,
494 int deref_ref, int recurse, enum val_prettyprint pretty)
496 struct ada_val_print_args args;
498 args.valaddr0 = valaddr0;
499 args.embedded_offset = embedded_offset;
500 args.address = address;
501 args.stream = stream;
502 args.format = format;
503 args.deref_ref = deref_ref;
504 args.recurse = recurse;
505 args.pretty = pretty;
507 return catch_errors (ada_val_print_stub, &args, NULL, RETURN_MASK_ALL);
510 /* Helper for ada_val_print; used as argument to catch_errors to
511 unmarshal the arguments to ada_val_print_1, which does the work. */
513 ada_val_print_stub (void * args0)
515 struct ada_val_print_args *argsp = (struct ada_val_print_args *) args0;
516 return ada_val_print_1 (argsp->type, argsp->valaddr0,
517 argsp->embedded_offset, argsp->address,
518 argsp->stream, argsp->format, argsp->deref_ref,
519 argsp->recurse, argsp->pretty);
522 /* See the comment on ada_val_print. This function differs in that it
523 * does not catch evaluation errors (leaving that to ada_val_print). */
526 ada_val_print_1 (struct type *type, char *valaddr0, int embedded_offset,
527 CORE_ADDR address, struct ui_file *stream, int format,
528 int deref_ref, int recurse, enum val_prettyprint pretty)
532 struct type *elttype;
536 char *valaddr = valaddr0 + embedded_offset;
538 CHECK_TYPEDEF (type);
540 if (ada_is_array_descriptor (type) || ada_is_packed_array_type (type))
543 struct value *mark = value_mark ();
545 val = value_from_contents_and_address (type, valaddr, address);
546 val = ada_coerce_to_simple_array_ptr (val);
549 fprintf_filtered (stream, "(null)");
553 retn = ada_val_print_1 (VALUE_TYPE (val), VALUE_CONTENTS (val), 0,
554 VALUE_ADDRESS (val), stream, format,
555 deref_ref, recurse, pretty);
556 value_free_to_mark (mark);
560 valaddr = ada_aligned_value_addr (type, valaddr);
561 embedded_offset -= valaddr - valaddr0 - embedded_offset;
562 type = printable_val_type (type, valaddr);
564 switch (TYPE_CODE (type))
567 return c_val_print (type, valaddr0, embedded_offset, address, stream,
568 format, deref_ref, recurse, pretty);
571 case TYPE_CODE_RANGE:
572 if (ada_is_fixed_point_type (type))
574 LONGEST v = unpack_long (type, valaddr);
575 int len = TYPE_LENGTH (type);
577 fprintf_filtered (stream, len < 4 ? "%.11g" : "%.17g",
578 (double) ada_fixed_to_float (type, v));
581 else if (ada_is_vax_floating_type (type))
584 value_from_contents_and_address (type, valaddr, address);
585 struct value *func = ada_vax_float_print_function (type);
588 static struct type *parray_of_char = NULL;
589 struct value *printable_val;
591 if (parray_of_char == NULL)
595 (NULL, builtin_type_char,
596 create_range_type (NULL, builtin_type_int, 0, 32)), NULL);
599 value_ind (value_cast (parray_of_char,
600 call_function_by_hand (func, 1,
603 fprintf_filtered (stream, "%s", VALUE_CONTENTS (printable_val));
606 /* No special printing function. Do as best we can. */
608 else if (TYPE_CODE (type) == TYPE_CODE_RANGE)
610 struct type *target_type = TYPE_TARGET_TYPE (type);
611 if (TYPE_LENGTH (type) != TYPE_LENGTH (target_type))
613 /* Obscure case of range type that has different length from
614 its base type. Perform a conversion, or we will get a
615 nonsense value. Actually, we could use the same
616 code regardless of lengths; I'm just avoiding a cast. */
617 struct value *v = value_cast (target_type,
618 value_from_contents_and_address
620 return ada_val_print_1 (target_type, VALUE_CONTENTS (v), 0, 0,
621 stream, format, 0, recurse + 1, pretty);
624 return ada_val_print_1 (TYPE_TARGET_TYPE (type),
625 valaddr0, embedded_offset,
626 address, stream, format, deref_ref,
631 format = format ? format : output_format;
634 print_scalar_formatted (valaddr, type, format, 0, stream);
638 val_print_type_code_int (type, valaddr, stream);
639 if (ada_is_character_type (type))
641 fputs_filtered (" ", stream);
642 ada_printchar ((unsigned char) unpack_long (type, valaddr),
652 print_scalar_formatted (valaddr, type, format, 0, stream);
655 len = TYPE_NFIELDS (type);
656 val = unpack_long (type, valaddr);
657 for (i = 0; i < len; i++)
660 if (val == TYPE_FIELD_BITPOS (type, i))
667 const char *name = ada_enum_name (TYPE_FIELD_NAME (type, i));
669 fprintf_filtered (stream, "%ld %s", (long) val, name);
671 fputs_filtered (name, stream);
675 print_longest (stream, 'd', 0, val);
679 case TYPE_CODE_UNION:
680 case TYPE_CODE_STRUCT:
681 if (ada_is_bogus_array_descriptor (type))
683 fprintf_filtered (stream, "(...?)");
688 print_record (type, valaddr, stream, format, recurse, pretty);
692 case TYPE_CODE_ARRAY:
693 if (TYPE_LENGTH (type) > 0 && TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > 0)
695 elttype = TYPE_TARGET_TYPE (type);
696 eltlen = TYPE_LENGTH (elttype);
697 len = TYPE_LENGTH (type) / eltlen;
699 /* For an array of chars, print with string syntax. */
700 if (ada_is_string_type (type) && (format == 0 || format == 's'))
702 if (prettyprint_arrays)
704 print_spaces_filtered (2 + 2 * recurse, stream);
706 /* If requested, look for the first null char and only print
707 elements up to it. */
708 if (stop_print_at_null)
712 /* Look for a NULL char. */
714 temp_len < len && temp_len < print_max
715 && char_at (valaddr, temp_len, eltlen) != 0;
720 printstr (stream, valaddr, len, 0, eltlen);
725 fprintf_filtered (stream, "(");
726 print_optional_low_bound (stream, type);
727 if (TYPE_FIELD_BITSIZE (type, 0) > 0)
728 val_print_packed_array_elements (type, valaddr, 0, stream,
729 format, recurse, pretty);
731 val_print_array_elements (type, valaddr, address, stream,
732 format, deref_ref, recurse,
734 fprintf_filtered (stream, ")");
741 elttype = check_typedef (TYPE_TARGET_TYPE (type));
744 fprintf_filtered (stream, "@");
745 print_address_numeric
746 (extract_address (valaddr,
747 TARGET_PTR_BIT / HOST_CHAR_BIT), 1, stream);
749 fputs_filtered (": ", stream);
751 /* De-reference the reference */
754 if (TYPE_CODE (elttype) != TYPE_CODE_UNDEF)
756 LONGEST deref_val_int = (LONGEST)
757 unpack_pointer (lookup_pointer_type (builtin_type_void),
759 if (deref_val_int != 0)
761 struct value *deref_val =
762 ada_value_ind (value_from_longest
763 (lookup_pointer_type (elttype),
765 val_print (VALUE_TYPE (deref_val),
766 VALUE_CONTENTS (deref_val), 0,
767 VALUE_ADDRESS (deref_val), stream, format,
768 deref_ref, recurse + 1, pretty);
771 fputs_filtered ("(null)", stream);
774 fputs_filtered ("???", stream);
782 print_variant_part (struct type *type, int field_num, char *valaddr,
783 struct ui_file *stream, int format, int recurse,
784 enum val_prettyprint pretty, int comma_needed,
785 struct type *outer_type, char *outer_valaddr)
787 struct type *var_type = TYPE_FIELD_TYPE (type, field_num);
788 int which = ada_which_variant_applies (var_type, outer_type, outer_valaddr);
793 return print_field_values
794 (TYPE_FIELD_TYPE (var_type, which),
795 valaddr + TYPE_FIELD_BITPOS (type, field_num) / HOST_CHAR_BIT
796 + TYPE_FIELD_BITPOS (var_type, which) / HOST_CHAR_BIT,
797 stream, format, recurse, pretty,
798 comma_needed, outer_type, outer_valaddr);
802 ada_value_print (struct value *val0, struct ui_file *stream, int format,
803 enum val_prettyprint pretty)
805 char *valaddr = VALUE_CONTENTS (val0);
806 CORE_ADDR address = VALUE_ADDRESS (val0) + VALUE_OFFSET (val0);
808 ada_to_fixed_type (VALUE_TYPE (val0), valaddr, address, NULL);
810 value_from_contents_and_address (type, valaddr, address);
812 /* If it is a pointer, indicate what it points to. */
813 if (TYPE_CODE (type) == TYPE_CODE_PTR || TYPE_CODE (type) == TYPE_CODE_REF)
815 /* Hack: remove (char *) for char strings. Their
816 type is indicated by the quoted string anyway. */
817 if (TYPE_CODE (type) == TYPE_CODE_PTR &&
818 TYPE_LENGTH (TYPE_TARGET_TYPE (type)) == sizeof (char) &&
819 TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_INT &&
820 !TYPE_UNSIGNED (TYPE_TARGET_TYPE (type)))
826 fprintf_filtered (stream, "(");
827 type_print (type, "", stream, -1);
828 fprintf_filtered (stream, ") ");
831 else if (ada_is_array_descriptor (type))
833 fprintf_filtered (stream, "(");
834 type_print (type, "", stream, -1);
835 fprintf_filtered (stream, ") ");
837 else if (ada_is_bogus_array_descriptor (type))
839 fprintf_filtered (stream, "(");
840 type_print (type, "", stream, -1);
841 fprintf_filtered (stream, ") (...?)");
844 return (val_print (type, VALUE_CONTENTS (val), 0, address,
845 stream, format, 1, 0, pretty));
849 print_record (struct type *type, char *valaddr, struct ui_file *stream,
850 int format, int recurse, enum val_prettyprint pretty)
852 CHECK_TYPEDEF (type);
854 fprintf_filtered (stream, "(");
856 if (print_field_values (type, valaddr, stream, format, recurse, pretty,
857 0, type, valaddr) != 0 && pretty)
859 fprintf_filtered (stream, "\n");
860 print_spaces_filtered (2 * recurse, stream);
863 fprintf_filtered (stream, ")");
866 /* Print out fields of value at VALADDR having structure type TYPE.
868 TYPE, VALADDR, STREAM, FORMAT, RECURSE, and PRETTY have the
869 same meanings as in ada_print_value and ada_val_print.
871 OUTER_TYPE and OUTER_VALADDR give type and address of enclosing record
872 (used to get discriminant values when printing variant parts).
874 COMMA_NEEDED is 1 if fields have been printed at the current recursion
875 level, so that a comma is needed before any field printed by this
878 Returns 1 if COMMA_NEEDED or any fields were printed. */
881 print_field_values (struct type *type, char *valaddr, struct ui_file *stream,
882 int format, int recurse, enum val_prettyprint pretty,
883 int comma_needed, struct type *outer_type,
888 len = TYPE_NFIELDS (type);
890 for (i = 0; i < len; i += 1)
892 if (ada_is_ignored_field (type, i))
895 if (ada_is_wrapper_field (type, i))
898 print_field_values (TYPE_FIELD_TYPE (type, i),
900 + TYPE_FIELD_BITPOS (type, i) / HOST_CHAR_BIT,
901 stream, format, recurse, pretty,
902 comma_needed, type, valaddr);
905 else if (ada_is_variant_part (type, i))
908 print_variant_part (type, i, valaddr,
909 stream, format, recurse, pretty, comma_needed,
910 outer_type, outer_valaddr);
915 fprintf_filtered (stream, ", ");
920 fprintf_filtered (stream, "\n");
921 print_spaces_filtered (2 + 2 * recurse, stream);
925 wrap_here (n_spaces (2 + 2 * recurse));
929 if (TYPE_CODE (TYPE_FIELD_TYPE (type, i)) == TYPE_CODE_PTR)
930 fputs_filtered ("\"( ptr \"", stream);
932 fputs_filtered ("\"( nodef \"", stream);
933 fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
934 language_cplus, DMGL_NO_OPTS);
935 fputs_filtered ("\" \"", stream);
936 fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
937 language_cplus, DMGL_NO_OPTS);
938 fputs_filtered ("\") \"", stream);
942 annotate_field_begin (TYPE_FIELD_TYPE (type, i));
943 fprintf_filtered (stream, "%.*s",
944 ada_name_prefix_len (TYPE_FIELD_NAME (type, i)),
945 TYPE_FIELD_NAME (type, i));
946 annotate_field_name_end ();
947 fputs_filtered (" => ", stream);
948 annotate_field_value ();
951 if (TYPE_FIELD_PACKED (type, i))
955 /* Bitfields require special handling, especially due to byte
957 if (TYPE_CPLUS_SPECIFIC (type) != NULL
958 && TYPE_FIELD_IGNORE (type, i))
960 fputs_filtered ("<optimized out or zero length>", stream);
964 int bit_pos = TYPE_FIELD_BITPOS (type, i);
965 int bit_size = TYPE_FIELD_BITSIZE (type, i);
967 adjust_type_signedness (TYPE_FIELD_TYPE (type, i));
968 v = ada_value_primitive_packed_val (NULL, valaddr,
969 bit_pos / HOST_CHAR_BIT,
970 bit_pos % HOST_CHAR_BIT,
972 TYPE_FIELD_TYPE (type, i));
973 val_print (TYPE_FIELD_TYPE (type, i), VALUE_CONTENTS (v), 0, 0,
974 stream, format, 0, recurse + 1, pretty);
978 ada_val_print (TYPE_FIELD_TYPE (type, i),
979 valaddr + TYPE_FIELD_BITPOS (type, i) / HOST_CHAR_BIT,
980 0, 0, stream, format, 0, recurse + 1, pretty);
981 annotate_field_end ();