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 extern int inspect_it;
50 extern unsigned int repeat_count_threshold;
52 static void print_record (struct type *, char *, struct ui_file *, int,
53 int, enum val_prettyprint);
55 static int print_field_values (struct type *, char *, struct ui_file *,
56 int, int, enum val_prettyprint,
57 int, struct type *, char *);
59 static int print_variant_part (struct type *, int, char *,
60 struct ui_file *, int, int,
61 enum val_prettyprint, int, struct type *,
64 static void val_print_packed_array_elements (struct type *, char *valaddr,
65 int, struct ui_file *, int, int,
66 enum val_prettyprint);
68 static void adjust_type_signedness (struct type *);
70 static int ada_val_print_stub (void *args0);
72 static int ada_val_print_1 (struct type *, char *, int, CORE_ADDR,
73 struct ui_file *, int, int, int,
74 enum val_prettyprint);
77 /* Make TYPE unsigned if its range of values includes no negatives. */
79 adjust_type_signedness (struct type *type)
81 if (type != NULL && TYPE_CODE (type) == TYPE_CODE_RANGE
82 && TYPE_LOW_BOUND (type) >= 0)
83 TYPE_FLAGS (type) |= TYPE_FLAG_UNSIGNED;
86 /* Assuming TYPE is a simple array type, prints its lower bound on STREAM,
87 if non-standard (i.e., other than 1 for numbers, other than lower bound
88 of index type for enumerated type). Returns 1 if something printed,
92 print_optional_low_bound (struct ui_file *stream, struct type *type)
94 struct type *index_type;
97 index_type = TYPE_INDEX_TYPE (type);
100 if (index_type == NULL)
102 if (TYPE_CODE (index_type) == TYPE_CODE_RANGE)
104 low_bound = TYPE_LOW_BOUND (index_type);
105 index_type = TYPE_TARGET_TYPE (index_type);
110 switch (TYPE_CODE (index_type))
113 if (low_bound == TYPE_FIELD_BITPOS (index_type, 0))
116 case TYPE_CODE_UNDEF:
117 index_type = builtin_type_long;
125 ada_print_scalar (index_type, (LONGEST) low_bound, stream);
126 fprintf_filtered (stream, " => ");
130 /* Version of val_print_array_elements for GNAT-style packed arrays.
131 Prints elements of packed array of type TYPE at bit offset
132 BITOFFSET from VALADDR on STREAM. Formats according to FORMAT and
133 separates with commas. RECURSE is the recursion (nesting) level.
134 If PRETTY, uses "prettier" format. TYPE must have been decoded (as
135 by ada_coerce_to_simple_array). */
138 val_print_packed_array_elements (struct type *type, char *valaddr,
139 int bitoffset, struct ui_file *stream,
140 int format, int recurse,
141 enum val_prettyprint pretty)
144 unsigned int things_printed = 0;
146 struct type *elttype;
148 /* Position of the array element we are examining to see
149 whether it is repeated. */
151 /* Number of repetitions we have detected so far. */
153 unsigned long bitsize = TYPE_FIELD_BITSIZE (type, 0);
154 struct value *mark = value_mark ();
156 elttype = TYPE_TARGET_TYPE (type);
157 eltlen = TYPE_LENGTH (check_typedef (elttype));
161 if (get_discrete_bounds (TYPE_FIELD_TYPE (type, 0), &low, &high) < 0)
164 len = high - low + 1;
168 annotate_array_section_begin (i, elttype);
170 while (i < len && things_printed < print_max)
172 struct value *v0, *v1;
177 if (prettyprint_arrays)
179 fprintf_filtered (stream, ",\n");
180 print_spaces_filtered (2 + 2 * recurse, stream);
184 fprintf_filtered (stream, ", ");
187 wrap_here (n_spaces (2 + 2 * recurse));
190 v0 = ada_value_primitive_packed_val (NULL, valaddr,
191 (i0 * bitsize) / HOST_CHAR_BIT,
192 (i0 * bitsize) % HOST_CHAR_BIT,
199 v1 = ada_value_primitive_packed_val (NULL, valaddr,
200 (i * bitsize) / HOST_CHAR_BIT,
201 (i * bitsize) % HOST_CHAR_BIT,
203 if (memcmp (VALUE_CONTENTS (v0), VALUE_CONTENTS (v1), eltlen) != 0)
207 if (i - i0 > repeat_count_threshold)
209 val_print (elttype, VALUE_CONTENTS (v0), 0, 0, stream, format,
210 0, recurse + 1, pretty);
211 annotate_elt_rep (i - i0);
212 fprintf_filtered (stream, " <repeats %u times>", i - i0);
213 annotate_elt_rep_end ();
219 for (j = i0; j < i; j += 1)
223 if (prettyprint_arrays)
225 fprintf_filtered (stream, ",\n");
226 print_spaces_filtered (2 + 2 * recurse, stream);
230 fprintf_filtered (stream, ", ");
232 wrap_here (n_spaces (2 + 2 * recurse));
234 val_print (elttype, VALUE_CONTENTS (v0), 0, 0, stream, format,
235 0, recurse + 1, pretty);
239 things_printed += i - i0;
241 annotate_array_section_end ();
244 fprintf_filtered (stream, "...");
247 value_free_to_mark (mark);
251 printable_val_type (struct type *type, char *valaddr)
253 return ada_to_fixed_type (ada_aligned_type (type), valaddr, 0, NULL);
256 /* Print the character C on STREAM as part of the contents of a literal
257 string whose delimiter is QUOTER. TYPE_LEN is the length in bytes
258 (1 or 2) of the character. */
261 ada_emit_char (int c, struct ui_file *stream, int quoter, int type_len)
266 c &= (1 << (type_len * TARGET_CHAR_BIT)) - 1;
268 if (isascii (c) && isprint (c))
270 if (c == quoter && c == '"')
271 fprintf_filtered (stream, "[\"%c\"]", quoter);
273 fprintf_filtered (stream, "%c", c);
276 fprintf_filtered (stream, "[\"%0*x\"]", type_len * 2, c);
279 /* Character #I of STRING, given that TYPE_LEN is the size in bytes (1
280 or 2) of a character. */
283 char_at (char *string, int i, int type_len)
288 return (int) extract_unsigned_integer (string + 2 * i, 2);
292 ada_printchar (int c, struct ui_file *stream)
294 fputs_filtered ("'", stream);
295 ada_emit_char (c, stream, '\'', 1);
296 fputs_filtered ("'", stream);
299 /* [From print_type_scalar in typeprint.c]. Print VAL on STREAM in a
300 form appropriate for TYPE. */
303 ada_print_scalar (struct type *type, LONGEST val, struct ui_file *stream)
308 CHECK_TYPEDEF (type);
310 switch (TYPE_CODE (type))
314 len = TYPE_NFIELDS (type);
315 for (i = 0; i < len; i++)
317 if (TYPE_FIELD_BITPOS (type, i) == val)
324 fputs_filtered (ada_enum_name (TYPE_FIELD_NAME (type, i)), stream);
328 print_longest (stream, 'd', 0, val);
333 print_longest (stream, TYPE_UNSIGNED (type) ? 'u' : 'd', 0, val);
337 LA_PRINT_CHAR ((unsigned char) val, stream);
341 fprintf_filtered (stream, val ? "true" : "false");
344 case TYPE_CODE_RANGE:
345 ada_print_scalar (TYPE_TARGET_TYPE (type), val, stream);
348 case TYPE_CODE_UNDEF:
350 case TYPE_CODE_ARRAY:
351 case TYPE_CODE_STRUCT:
352 case TYPE_CODE_UNION:
357 case TYPE_CODE_STRING:
358 case TYPE_CODE_ERROR:
359 case TYPE_CODE_MEMBER:
360 case TYPE_CODE_METHOD:
362 warning ("internal error: unhandled type in ada_print_scalar");
366 error ("Invalid type code in symbol table.");
371 /* Print the character string STRING, printing at most LENGTH characters.
372 Printing stops early if the number hits print_max; repeat counts
373 are printed as appropriate. Print ellipses at the end if we
374 had to stop before printing LENGTH characters, or if
375 FORCE_ELLIPSES. TYPE_LEN is the length (1 or 2) of the character type.
379 printstr (struct ui_file *stream, char *string, unsigned int length,
380 int force_ellipses, int type_len)
383 unsigned int things_printed = 0;
389 fputs_filtered ("\"\"", stream);
393 for (i = 0; i < length && things_printed < print_max; i += 1)
395 /* Position of the character we are examining
396 to see whether it is repeated. */
398 /* Number of repetitions we have detected so far. */
405 fputs_filtered (", ", stream);
411 while (rep1 < length &&
412 char_at (string, rep1, type_len) == char_at (string, i,
419 if (reps > repeat_count_threshold)
424 fputs_filtered ("\\\", ", stream);
426 fputs_filtered ("\", ", stream);
429 fputs_filtered ("'", stream);
430 ada_emit_char (char_at (string, i, type_len), stream, '\'',
432 fputs_filtered ("'", stream);
433 fprintf_filtered (stream, " <repeats %u times>", reps);
435 things_printed += repeat_count_threshold;
443 fputs_filtered ("\\\"", stream);
445 fputs_filtered ("\"", stream);
448 ada_emit_char (char_at (string, i, type_len), stream, '"',
454 /* Terminate the quotes if necessary. */
458 fputs_filtered ("\\\"", stream);
460 fputs_filtered ("\"", stream);
463 if (force_ellipses || i < length)
464 fputs_filtered ("...", stream);
468 ada_printstr (struct ui_file *stream, char *string, unsigned int length,
469 int force_ellipses, int width)
471 printstr (stream, string, length, force_ellipses, width);
475 /* Print data of type TYPE located at VALADDR (within GDB), which came from
476 the inferior at address ADDRESS, onto stdio stream STREAM according to
477 FORMAT (a letter as for the printf % codes or 0 for natural format).
478 The data at VALADDR is in target byte order.
480 If the data is printed as a string, returns the number of string characters
483 If DEREF_REF is nonzero, then dereference references, otherwise just print
486 RECURSE indicates the amount of indentation to supply before
487 continuation lines; this amount is roughly twice the value of RECURSE.
489 When PRETTY is non-zero, prints record fields on separate lines.
490 (For some reason, the current version of gdb instead uses a global
491 variable---prettyprint_arrays--- to causes a similar effect on
495 ada_val_print (struct type *type, char *valaddr0, int embedded_offset,
496 CORE_ADDR address, struct ui_file *stream, int format,
497 int deref_ref, int recurse, enum val_prettyprint pretty)
499 struct ada_val_print_args args;
501 args.valaddr0 = valaddr0;
502 args.embedded_offset = embedded_offset;
503 args.address = address;
504 args.stream = stream;
505 args.format = format;
506 args.deref_ref = deref_ref;
507 args.recurse = recurse;
508 args.pretty = pretty;
510 return catch_errors (ada_val_print_stub, &args, NULL, RETURN_MASK_ALL);
513 /* Helper for ada_val_print; used as argument to catch_errors to
514 unmarshal the arguments to ada_val_print_1, which does the work. */
516 ada_val_print_stub (void * args0)
518 struct ada_val_print_args *argsp = (struct ada_val_print_args *) args0;
519 return ada_val_print_1 (argsp->type, argsp->valaddr0,
520 argsp->embedded_offset, argsp->address,
521 argsp->stream, argsp->format, argsp->deref_ref,
522 argsp->recurse, argsp->pretty);
525 /* See the comment on ada_val_print. This function differs in that it
526 * does not catch evaluation errors (leaving that to ada_val_print). */
529 ada_val_print_1 (struct type *type, char *valaddr0, int embedded_offset,
530 CORE_ADDR address, struct ui_file *stream, int format,
531 int deref_ref, int recurse, enum val_prettyprint pretty)
535 struct type *elttype;
539 char *valaddr = valaddr0 + embedded_offset;
541 CHECK_TYPEDEF (type);
543 if (ada_is_array_descriptor (type) || ada_is_packed_array_type (type))
546 struct value *mark = value_mark ();
548 val = value_from_contents_and_address (type, valaddr, address);
549 val = ada_coerce_to_simple_array_ptr (val);
552 fprintf_filtered (stream, "(null)");
556 retn = ada_val_print_1 (VALUE_TYPE (val), VALUE_CONTENTS (val), 0,
557 VALUE_ADDRESS (val), stream, format,
558 deref_ref, recurse, pretty);
559 value_free_to_mark (mark);
563 valaddr = ada_aligned_value_addr (type, valaddr);
564 embedded_offset -= valaddr - valaddr0 - embedded_offset;
565 type = printable_val_type (type, valaddr);
567 switch (TYPE_CODE (type))
570 return c_val_print (type, valaddr0, embedded_offset, address, stream,
571 format, deref_ref, recurse, pretty);
574 case TYPE_CODE_RANGE:
575 if (ada_is_fixed_point_type (type))
577 LONGEST v = unpack_long (type, valaddr);
578 int len = TYPE_LENGTH (type);
580 fprintf_filtered (stream, len < 4 ? "%.11g" : "%.17g",
581 (double) ada_fixed_to_float (type, v));
584 else if (ada_is_vax_floating_type (type))
587 value_from_contents_and_address (type, valaddr, address);
588 struct value *func = ada_vax_float_print_function (type);
591 static struct type *parray_of_char = NULL;
592 struct value *printable_val;
594 if (parray_of_char == NULL)
598 (NULL, builtin_type_char,
599 create_range_type (NULL, builtin_type_int, 0, 32)), NULL);
602 value_ind (value_cast (parray_of_char,
603 call_function_by_hand (func, 1,
606 fprintf_filtered (stream, "%s", VALUE_CONTENTS (printable_val));
609 /* No special printing function. Do as best we can. */
611 else if (TYPE_CODE (type) == TYPE_CODE_RANGE)
613 struct type *target_type = TYPE_TARGET_TYPE (type);
614 if (TYPE_LENGTH (type) != TYPE_LENGTH (target_type))
616 /* Obscure case of range type that has different length from
617 its base type. Perform a conversion, or we will get a
618 nonsense value. Actually, we could use the same
619 code regardless of lengths; I'm just avoiding a cast. */
620 struct value *v = value_cast (target_type,
621 value_from_contents_and_address
623 return ada_val_print_1 (target_type, VALUE_CONTENTS (v), 0, 0,
624 stream, format, 0, recurse + 1, pretty);
627 return ada_val_print_1 (TYPE_TARGET_TYPE (type),
628 valaddr0, embedded_offset,
629 address, stream, format, deref_ref,
634 format = format ? format : output_format;
637 print_scalar_formatted (valaddr, type, format, 0, stream);
641 val_print_type_code_int (type, valaddr, stream);
642 if (ada_is_character_type (type))
644 fputs_filtered (" ", stream);
645 ada_printchar ((unsigned char) unpack_long (type, valaddr),
655 print_scalar_formatted (valaddr, type, format, 0, stream);
658 len = TYPE_NFIELDS (type);
659 val = unpack_long (type, valaddr);
660 for (i = 0; i < len; i++)
663 if (val == TYPE_FIELD_BITPOS (type, i))
670 const char *name = ada_enum_name (TYPE_FIELD_NAME (type, i));
672 fprintf_filtered (stream, "%ld %s", (long) val, name);
674 fputs_filtered (name, stream);
678 print_longest (stream, 'd', 0, val);
682 case TYPE_CODE_UNION:
683 case TYPE_CODE_STRUCT:
684 if (ada_is_bogus_array_descriptor (type))
686 fprintf_filtered (stream, "(...?)");
691 print_record (type, valaddr, stream, format, recurse, pretty);
695 case TYPE_CODE_ARRAY:
696 if (TYPE_LENGTH (type) > 0 && TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > 0)
698 elttype = TYPE_TARGET_TYPE (type);
699 eltlen = TYPE_LENGTH (elttype);
700 len = TYPE_LENGTH (type) / eltlen;
702 /* For an array of chars, print with string syntax. */
703 if (ada_is_string_type (type) && (format == 0 || format == 's'))
705 if (prettyprint_arrays)
707 print_spaces_filtered (2 + 2 * recurse, stream);
709 /* If requested, look for the first null char and only print
710 elements up to it. */
711 if (stop_print_at_null)
715 /* Look for a NULL char. */
717 temp_len < len && temp_len < print_max
718 && char_at (valaddr, temp_len, eltlen) != 0;
723 printstr (stream, valaddr, len, 0, eltlen);
728 fprintf_filtered (stream, "(");
729 print_optional_low_bound (stream, type);
730 if (TYPE_FIELD_BITSIZE (type, 0) > 0)
731 val_print_packed_array_elements (type, valaddr, 0, stream,
732 format, recurse, pretty);
734 val_print_array_elements (type, valaddr, address, stream,
735 format, deref_ref, recurse,
737 fprintf_filtered (stream, ")");
744 elttype = check_typedef (TYPE_TARGET_TYPE (type));
747 fprintf_filtered (stream, "@");
748 print_address_numeric
749 (extract_address (valaddr,
750 TARGET_PTR_BIT / HOST_CHAR_BIT), 1, stream);
752 fputs_filtered (": ", stream);
754 /* De-reference the reference */
757 if (TYPE_CODE (elttype) != TYPE_CODE_UNDEF)
759 LONGEST deref_val_int = (LONGEST)
760 unpack_pointer (lookup_pointer_type (builtin_type_void),
762 if (deref_val_int != 0)
764 struct value *deref_val =
765 ada_value_ind (value_from_longest
766 (lookup_pointer_type (elttype),
768 val_print (VALUE_TYPE (deref_val),
769 VALUE_CONTENTS (deref_val), 0,
770 VALUE_ADDRESS (deref_val), stream, format,
771 deref_ref, recurse + 1, pretty);
774 fputs_filtered ("(null)", stream);
777 fputs_filtered ("???", stream);
785 print_variant_part (struct type *type, int field_num, char *valaddr,
786 struct ui_file *stream, int format, int recurse,
787 enum val_prettyprint pretty, int comma_needed,
788 struct type *outer_type, char *outer_valaddr)
790 struct type *var_type = TYPE_FIELD_TYPE (type, field_num);
791 int which = ada_which_variant_applies (var_type, outer_type, outer_valaddr);
796 return print_field_values
797 (TYPE_FIELD_TYPE (var_type, which),
798 valaddr + TYPE_FIELD_BITPOS (type, field_num) / HOST_CHAR_BIT
799 + TYPE_FIELD_BITPOS (var_type, which) / HOST_CHAR_BIT,
800 stream, format, recurse, pretty,
801 comma_needed, outer_type, outer_valaddr);
805 ada_value_print (struct value *val0, struct ui_file *stream, int format,
806 enum val_prettyprint pretty)
808 char *valaddr = VALUE_CONTENTS (val0);
809 CORE_ADDR address = VALUE_ADDRESS (val0) + VALUE_OFFSET (val0);
811 ada_to_fixed_type (VALUE_TYPE (val0), valaddr, address, NULL);
813 value_from_contents_and_address (type, valaddr, address);
815 /* If it is a pointer, indicate what it points to. */
816 if (TYPE_CODE (type) == TYPE_CODE_PTR || TYPE_CODE (type) == TYPE_CODE_REF)
818 /* Hack: remove (char *) for char strings. Their
819 type is indicated by the quoted string anyway. */
820 if (TYPE_CODE (type) == TYPE_CODE_PTR &&
821 TYPE_LENGTH (TYPE_TARGET_TYPE (type)) == sizeof (char) &&
822 TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_INT &&
823 !TYPE_UNSIGNED (TYPE_TARGET_TYPE (type)))
829 fprintf_filtered (stream, "(");
830 type_print (type, "", stream, -1);
831 fprintf_filtered (stream, ") ");
834 else if (ada_is_array_descriptor (type))
836 fprintf_filtered (stream, "(");
837 type_print (type, "", stream, -1);
838 fprintf_filtered (stream, ") ");
840 else if (ada_is_bogus_array_descriptor (type))
842 fprintf_filtered (stream, "(");
843 type_print (type, "", stream, -1);
844 fprintf_filtered (stream, ") (...?)");
847 return (val_print (type, VALUE_CONTENTS (val), 0, address,
848 stream, format, 1, 0, pretty));
852 print_record (struct type *type, char *valaddr, struct ui_file *stream,
853 int format, int recurse, enum val_prettyprint pretty)
855 CHECK_TYPEDEF (type);
857 fprintf_filtered (stream, "(");
859 if (print_field_values (type, valaddr, stream, format, recurse, pretty,
860 0, type, valaddr) != 0 && pretty)
862 fprintf_filtered (stream, "\n");
863 print_spaces_filtered (2 * recurse, stream);
866 fprintf_filtered (stream, ")");
869 /* Print out fields of value at VALADDR having structure type TYPE.
871 TYPE, VALADDR, STREAM, FORMAT, RECURSE, and PRETTY have the
872 same meanings as in ada_print_value and ada_val_print.
874 OUTER_TYPE and OUTER_VALADDR give type and address of enclosing record
875 (used to get discriminant values when printing variant parts).
877 COMMA_NEEDED is 1 if fields have been printed at the current recursion
878 level, so that a comma is needed before any field printed by this
881 Returns 1 if COMMA_NEEDED or any fields were printed. */
884 print_field_values (struct type *type, char *valaddr, struct ui_file *stream,
885 int format, int recurse, enum val_prettyprint pretty,
886 int comma_needed, struct type *outer_type,
891 len = TYPE_NFIELDS (type);
893 for (i = 0; i < len; i += 1)
895 if (ada_is_ignored_field (type, i))
898 if (ada_is_wrapper_field (type, i))
901 print_field_values (TYPE_FIELD_TYPE (type, i),
903 + TYPE_FIELD_BITPOS (type, i) / HOST_CHAR_BIT,
904 stream, format, recurse, pretty,
905 comma_needed, type, valaddr);
908 else if (ada_is_variant_part (type, i))
911 print_variant_part (type, i, valaddr,
912 stream, format, recurse, pretty, comma_needed,
913 outer_type, outer_valaddr);
918 fprintf_filtered (stream, ", ");
923 fprintf_filtered (stream, "\n");
924 print_spaces_filtered (2 + 2 * recurse, stream);
928 wrap_here (n_spaces (2 + 2 * recurse));
932 if (TYPE_CODE (TYPE_FIELD_TYPE (type, i)) == TYPE_CODE_PTR)
933 fputs_filtered ("\"( ptr \"", stream);
935 fputs_filtered ("\"( nodef \"", stream);
936 fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
937 language_cplus, DMGL_NO_OPTS);
938 fputs_filtered ("\" \"", stream);
939 fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
940 language_cplus, DMGL_NO_OPTS);
941 fputs_filtered ("\") \"", stream);
945 annotate_field_begin (TYPE_FIELD_TYPE (type, i));
946 fprintf_filtered (stream, "%.*s",
947 ada_name_prefix_len (TYPE_FIELD_NAME (type, i)),
948 TYPE_FIELD_NAME (type, i));
949 annotate_field_name_end ();
950 fputs_filtered (" => ", stream);
951 annotate_field_value ();
954 if (TYPE_FIELD_PACKED (type, i))
958 /* Bitfields require special handling, especially due to byte
960 if (TYPE_CPLUS_SPECIFIC (type) != NULL
961 && TYPE_FIELD_IGNORE (type, i))
963 fputs_filtered ("<optimized out or zero length>", stream);
967 int bit_pos = TYPE_FIELD_BITPOS (type, i);
968 int bit_size = TYPE_FIELD_BITSIZE (type, i);
970 adjust_type_signedness (TYPE_FIELD_TYPE (type, i));
971 v = ada_value_primitive_packed_val (NULL, valaddr,
972 bit_pos / HOST_CHAR_BIT,
973 bit_pos % HOST_CHAR_BIT,
975 TYPE_FIELD_TYPE (type, i));
976 val_print (TYPE_FIELD_TYPE (type, i), VALUE_CONTENTS (v), 0, 0,
977 stream, format, 0, recurse + 1, pretty);
981 ada_val_print (TYPE_FIELD_TYPE (type, i),
982 valaddr + TYPE_FIELD_BITPOS (type, i) / HOST_CHAR_BIT,
983 0, 0, stream, format, 0, recurse + 1, pretty);
984 annotate_field_end ();