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"
34 /* Encapsulates arguments to ada_val_print. */
35 struct ada_val_print_args {
40 struct ui_file *stream;
44 enum val_prettyprint pretty;
47 extern int inspect_it;
48 extern unsigned int repeat_count_threshold;
50 static void print_record (struct type*, char*, struct ui_file*, int,
51 int, enum val_prettyprint);
53 static int print_field_values (struct type*, char*, struct ui_file*,
54 int, int, enum val_prettyprint,
55 int, struct type*, char*);
57 static int print_variant_part (struct type*, int, char*,
58 struct ui_file*, int, int, enum val_prettyprint,
59 int, struct type*, char*);
62 val_print_packed_array_elements (struct type*, char *valaddr, int,
63 struct ui_file*, int, int,
64 enum val_prettyprint);
66 static void adjust_type_signedness (struct type*);
68 static int ada_val_print_stub (PTR args0);
71 ada_val_print_1 (struct type*, char*, int, CORE_ADDR, struct ui_file*,
72 int, int, int, enum val_prettyprint);
75 /* Make TYPE unsigned if its range of values includes no negatives. */
77 adjust_type_signedness (type)
80 if (type != NULL && TYPE_CODE (type) == TYPE_CODE_RANGE
81 && TYPE_LOW_BOUND (type) >= 0)
82 TYPE_FLAGS (type) |= TYPE_FLAG_UNSIGNED;
85 /* Assuming TYPE is a simple array type, prints its lower bound on STREAM,
86 if non-standard (i.e., other than 1 for numbers, other than lower bound
87 of index type for enumerated type). Returns 1 if something printed,
91 print_optional_low_bound (stream, type)
92 struct ui_file *stream;
95 struct type *index_type;
98 index_type = TYPE_INDEX_TYPE (type);
101 if (index_type == NULL)
103 if (TYPE_CODE (index_type) == TYPE_CODE_RANGE)
105 low_bound = TYPE_LOW_BOUND (index_type);
106 index_type = TYPE_TARGET_TYPE (index_type);
111 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 (type, valaddr, bitoffset, stream, format,
143 struct ui_file *stream;
146 enum val_prettyprint pretty;
149 unsigned int things_printed = 0;
151 struct type *elttype;
153 /* Position of the array element we are examining to see
154 whether it is repeated. */
156 /* Number of repetitions we have detected so far. */
158 unsigned long bitsize = TYPE_FIELD_BITSIZE (type, 0);
159 struct value* mark = value_mark ();
161 elttype = TYPE_TARGET_TYPE (type);
162 eltlen = TYPE_LENGTH (check_typedef (elttype));
166 if (get_discrete_bounds (TYPE_FIELD_TYPE (type, 0), &low, &high) < 0)
169 len = high - low + 1;
173 annotate_array_section_begin (i, elttype);
175 while (i < len && things_printed < print_max)
177 struct value *v0, *v1;
182 if (prettyprint_arrays)
184 fprintf_filtered (stream, ",\n");
185 print_spaces_filtered (2 + 2 * recurse, stream);
189 fprintf_filtered (stream, ", ");
192 wrap_here (n_spaces (2 + 2 * recurse));
195 v0 = ada_value_primitive_packed_val (NULL, valaddr,
196 (i0 * bitsize) / HOST_CHAR_BIT,
197 (i0 * bitsize) % HOST_CHAR_BIT,
204 v1 = ada_value_primitive_packed_val (NULL, valaddr,
205 (i * bitsize) / HOST_CHAR_BIT,
206 (i * bitsize) % HOST_CHAR_BIT,
208 if (memcmp (VALUE_CONTENTS (v0), VALUE_CONTENTS (v1), eltlen)
213 if (i - i0 > repeat_count_threshold)
215 val_print (elttype, VALUE_CONTENTS (v0), 0, 0, stream, format,
216 0, recurse + 1, pretty);
217 annotate_elt_rep (i - i0);
218 fprintf_filtered (stream, " <repeats %u times>", i - i0);
219 annotate_elt_rep_end ();
225 for (j = i0; j < i; j += 1)
229 if (prettyprint_arrays)
231 fprintf_filtered (stream, ",\n");
232 print_spaces_filtered (2 + 2 * recurse, stream);
236 fprintf_filtered (stream, ", ");
238 wrap_here (n_spaces (2 + 2 * recurse));
240 val_print (elttype, VALUE_CONTENTS (v0), 0, 0, stream, format,
241 0, recurse + 1, pretty);
245 things_printed += i - i0;
247 annotate_array_section_end ();
250 fprintf_filtered (stream, "...");
253 value_free_to_mark (mark);
257 printable_val_type (type, valaddr)
261 return ada_to_fixed_type (ada_aligned_type (type), valaddr, 0, NULL);
264 /* Print the character C on STREAM as part of the contents of a literal
265 string whose delimiter is QUOTER. TYPE_LEN is the length in bytes
266 (1 or 2) of the character. */
269 ada_emit_char (c, stream, quoter, type_len)
271 struct ui_file *stream;
278 c &= (1 << (type_len * TARGET_CHAR_BIT)) - 1;
280 if (isascii (c) && isprint (c))
282 if (c == quoter && c == '"')
283 fprintf_filtered (stream, "[\"%c\"]", quoter);
285 fprintf_filtered (stream, "%c", c);
288 fprintf_filtered (stream, "[\"%0*x\"]", type_len*2, c);
291 /* Character #I of STRING, given that TYPE_LEN is the size in bytes (1
292 or 2) of a character. */
295 char_at (string, i, type_len)
303 return (int) extract_unsigned_integer (string + 2*i, 2);
307 ada_printchar (c, stream)
309 struct ui_file *stream;
311 fputs_filtered ("'", stream);
312 ada_emit_char (c, stream, '\'', 1);
313 fputs_filtered ("'", stream);
316 /* [From print_type_scalar in typeprint.c]. Print VAL on STREAM in a
317 form appropriate for TYPE. */
320 ada_print_scalar (type, val, stream)
323 struct ui_file *stream;
328 CHECK_TYPEDEF (type);
330 switch (TYPE_CODE (type))
334 len = TYPE_NFIELDS (type);
335 for (i = 0; i < len; i++)
337 if (TYPE_FIELD_BITPOS (type, i) == val)
344 fputs_filtered (ada_enum_name (TYPE_FIELD_NAME (type, i)), stream);
348 print_longest (stream, 'd', 0, val);
353 print_longest (stream, TYPE_UNSIGNED (type) ? 'u' : 'd', 0, val);
357 LA_PRINT_CHAR ((unsigned char) val, stream);
361 fprintf_filtered (stream, val ? "true" : "false");
364 case TYPE_CODE_RANGE:
365 ada_print_scalar (TYPE_TARGET_TYPE (type), val, stream);
368 case TYPE_CODE_UNDEF:
370 case TYPE_CODE_ARRAY:
371 case TYPE_CODE_STRUCT:
372 case TYPE_CODE_UNION:
377 case TYPE_CODE_STRING:
378 case TYPE_CODE_ERROR:
379 case TYPE_CODE_MEMBER:
380 case TYPE_CODE_METHOD:
382 warning ("internal error: unhandled type in ada_print_scalar");
386 error ("Invalid type code in symbol table.");
391 /* Print the character string STRING, printing at most LENGTH characters.
392 Printing stops early if the number hits print_max; repeat counts
393 are printed as appropriate. Print ellipses at the end if we
394 had to stop before printing LENGTH characters, or if
395 FORCE_ELLIPSES. TYPE_LEN is the length (1 or 2) of the character type.
399 printstr (stream, string, length, force_ellipses, type_len)
400 struct ui_file *stream;
407 unsigned int things_printed = 0;
413 fputs_filtered ("\"\"", stream);
417 for (i = 0; i < length && things_printed < print_max; i += 1)
419 /* Position of the character we are examining
420 to see whether it is repeated. */
422 /* Number of repetitions we have detected so far. */
429 fputs_filtered (", ", stream);
435 while (rep1 < length &&
436 char_at(string, rep1, type_len) == char_at (string, i, type_len))
442 if (reps > repeat_count_threshold)
447 fputs_filtered ("\\\", ", stream);
449 fputs_filtered ("\", ", stream);
452 fputs_filtered ("'", stream);
453 ada_emit_char (char_at (string, i, type_len), stream, '\'', type_len);
454 fputs_filtered ("'", stream);
455 fprintf_filtered (stream, " <repeats %u times>", reps);
457 things_printed += repeat_count_threshold;
465 fputs_filtered ("\\\"", stream);
467 fputs_filtered ("\"", stream);
470 ada_emit_char (char_at (string, i, type_len), stream, '"',
476 /* Terminate the quotes if necessary. */
480 fputs_filtered ("\\\"", stream);
482 fputs_filtered ("\"", stream);
485 if (force_ellipses || i < length)
486 fputs_filtered ("...", stream);
490 ada_printstr (stream, string, length, force_ellipses, width)
491 struct ui_file *stream;
497 printstr (stream, string, length, force_ellipses, width);
501 /* Print data of type TYPE located at VALADDR (within GDB), which came from
502 the inferior at address ADDRESS, onto stdio stream STREAM according to
503 FORMAT (a letter as for the printf % codes or 0 for natural format).
504 The data at VALADDR is in target byte order.
506 If the data is printed as a string, returns the number of string characters
509 If DEREF_REF is nonzero, then dereference references, otherwise just print
512 RECURSE indicates the amount of indentation to supply before
513 continuation lines; this amount is roughly twice the value of RECURSE.
515 When PRETTY is non-zero, prints record fields on separate lines.
516 (For some reason, the current version of gdb instead uses a global
517 variable---prettyprint_arrays--- to causes a similar effect on
521 ada_val_print (type, valaddr0, embedded_offset, address, stream,
522 format, deref_ref, recurse, pretty)
527 struct ui_file *stream;
531 enum val_prettyprint pretty;
533 struct ada_val_print_args args;
534 args.type = type; args.valaddr0 = valaddr0;
535 args.embedded_offset = embedded_offset;
536 args.address = address;
537 args.stream = stream;
538 args.format = format;
539 args.deref_ref = deref_ref;
540 args.recurse = recurse;
541 args.pretty = pretty;
543 return catch_errors (ada_val_print_stub, &args, NULL, RETURN_MASK_ALL);
546 /* Helper for ada_val_print; used as argument to catch_errors to
547 unmarshal the arguments to ada_val_print_1, which does the work. */
549 ada_val_print_stub (PTR args0)
551 struct ada_val_print_args* argsp = (struct ada_val_print_args*) args0;
552 return ada_val_print_1 (argsp->type, argsp->valaddr0, argsp->embedded_offset,
553 argsp->address, argsp->stream, argsp->format,
554 argsp->deref_ref, argsp->recurse,
558 /* See the comment on ada_val_print. This function differs in that it
559 * does not catch evaluation errors (leaving that to ada_val_print). */
562 ada_val_print_1 (type, valaddr0, embedded_offset, address, stream,
563 format, deref_ref, recurse, pretty)
568 struct ui_file *stream;
572 enum val_prettyprint pretty;
576 struct type *elttype;
580 char* valaddr = valaddr0 + embedded_offset;
582 CHECK_TYPEDEF (type);
584 if (ada_is_array_descriptor (type) || ada_is_packed_array_type (type))
587 struct value* mark = value_mark ();
589 val = value_from_contents_and_address (type, valaddr, address);
590 val = ada_coerce_to_simple_array_ptr (val);
593 fprintf_filtered (stream, "(null)");
597 retn = ada_val_print_1 (VALUE_TYPE (val), VALUE_CONTENTS (val), 0,
598 VALUE_ADDRESS (val), stream, format,
599 deref_ref, recurse, pretty);
600 value_free_to_mark (mark);
604 valaddr = ada_aligned_value_addr (type, valaddr);
605 embedded_offset -= valaddr - valaddr0 - embedded_offset;
606 type = printable_val_type (type, valaddr);
608 switch (TYPE_CODE (type))
611 return c_val_print (type, valaddr0, embedded_offset, address, stream,
612 format, deref_ref, recurse, pretty);
615 case TYPE_CODE_RANGE:
616 if (ada_is_fixed_point_type (type))
618 LONGEST v = unpack_long (type, valaddr);
619 int len = TYPE_LENGTH (type);
621 fprintf_filtered (stream, len < 4 ? "%.11g" : "%.17g",
622 (double) ada_fixed_to_float (type, v));
625 else if (ada_is_vax_floating_type (type))
628 value_from_contents_and_address (type, valaddr, address);
629 struct value* func = ada_vax_float_print_function (type);
632 static struct type* parray_of_char = NULL;
633 struct value* printable_val;
635 if (parray_of_char == NULL)
639 (NULL, builtin_type_char,
640 create_range_type (NULL, builtin_type_int, 0, 32)),
644 value_ind (value_cast (parray_of_char,
645 call_function_by_hand (func, 1, &val)));
647 fprintf_filtered (stream, "%s", VALUE_CONTENTS (printable_val));
650 /* No special printing function. Do as best we can. */
652 else if (TYPE_CODE (type) == TYPE_CODE_RANGE)
654 struct type* target_type = TYPE_TARGET_TYPE (type);
655 if (TYPE_LENGTH (type) != TYPE_LENGTH (target_type))
657 /* Obscure case of range type that has different length from
658 its base type. Perform a conversion, or we will get a
659 nonsense value. Actually, we could use the same
660 code regardless of lengths; I'm just avoiding a cast. */
662 value_cast (target_type,
663 value_from_contents_and_address (type, valaddr, 0));
664 return ada_val_print_1 (target_type, VALUE_CONTENTS (v), 0, 0,
665 stream, format, 0, recurse + 1, pretty);
668 return ada_val_print_1 (TYPE_TARGET_TYPE (type),
669 valaddr0, embedded_offset,
670 address, stream, format, deref_ref,
675 format = format ? format : output_format;
678 print_scalar_formatted (valaddr, type, format, 0, stream);
682 val_print_type_code_int (type, valaddr, stream);
683 if (ada_is_character_type (type))
685 fputs_filtered (" ", stream);
686 ada_printchar ((unsigned char) unpack_long (type, valaddr),
696 print_scalar_formatted (valaddr, type, format, 0, stream);
699 len = TYPE_NFIELDS (type);
700 val = unpack_long (type, valaddr);
701 for (i = 0; i < len; i++)
704 if (val == TYPE_FIELD_BITPOS (type, i))
711 const char* name = ada_enum_name (TYPE_FIELD_NAME (type, i));
713 fprintf_filtered (stream, "%ld %s", (long) val, name);
715 fputs_filtered (name, stream);
719 print_longest (stream, 'd', 0, val);
723 case TYPE_CODE_UNION:
724 case TYPE_CODE_STRUCT:
725 if (ada_is_bogus_array_descriptor (type))
727 fprintf_filtered (stream, "(...?)");
732 print_record (type, valaddr, stream, format,
737 case TYPE_CODE_ARRAY:
738 if (TYPE_LENGTH (type) > 0 && TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > 0)
740 elttype = TYPE_TARGET_TYPE (type);
741 eltlen = TYPE_LENGTH (elttype);
742 len = TYPE_LENGTH (type) / eltlen;
744 /* For an array of chars, print with string syntax. */
745 if (ada_is_string_type (type)
746 && (format == 0 || format == 's'))
748 if (prettyprint_arrays)
750 print_spaces_filtered (2 + 2 * recurse, stream);
752 /* If requested, look for the first null char and only print
753 elements up to it. */
754 if (stop_print_at_null)
758 /* Look for a NULL char. */
760 temp_len < len && temp_len < print_max
761 && char_at (valaddr, temp_len, eltlen) != 0;
766 printstr (stream, valaddr, len, 0, eltlen);
771 fprintf_filtered (stream, "(");
772 print_optional_low_bound (stream, type);
773 if (TYPE_FIELD_BITSIZE (type, 0) > 0)
774 val_print_packed_array_elements (type, valaddr, 0, stream,
778 val_print_array_elements (type, valaddr, address, stream,
779 format, deref_ref, recurse,
781 fprintf_filtered (stream, ")");
788 elttype = check_typedef (TYPE_TARGET_TYPE (type));
791 fprintf_filtered (stream, "@");
792 print_address_numeric
793 (extract_address (valaddr,
794 TARGET_PTR_BIT / HOST_CHAR_BIT), 1, stream);
796 fputs_filtered (": ", stream);
798 /* De-reference the reference */
801 if (TYPE_CODE (elttype) != TYPE_CODE_UNDEF)
803 LONGEST deref_val_int = (LONGEST)
804 unpack_pointer (lookup_pointer_type (builtin_type_void),
806 if (deref_val_int != 0)
808 struct value* deref_val =
809 ada_value_ind (value_from_longest
810 (lookup_pointer_type (elttype),
812 val_print (VALUE_TYPE (deref_val),
813 VALUE_CONTENTS (deref_val), 0,
814 VALUE_ADDRESS (deref_val), stream, format,
815 deref_ref, recurse + 1, pretty);
818 fputs_filtered ("(null)", stream);
821 fputs_filtered ("???", stream);
829 print_variant_part (type, field_num, valaddr,
830 stream, format, recurse, pretty, comma_needed,
831 outer_type, outer_valaddr)
835 struct ui_file *stream;
838 enum val_prettyprint pretty;
840 struct type *outer_type;
843 struct type *var_type = TYPE_FIELD_TYPE (type, field_num);
845 ada_which_variant_applies (var_type, outer_type, outer_valaddr);
850 return print_field_values
851 (TYPE_FIELD_TYPE (var_type, which),
852 valaddr + TYPE_FIELD_BITPOS (type, field_num) / HOST_CHAR_BIT
853 + TYPE_FIELD_BITPOS (var_type, which) / HOST_CHAR_BIT,
854 stream, format, recurse, pretty,
855 comma_needed, outer_type, outer_valaddr);
859 ada_value_print (val0, stream, format, pretty)
861 struct ui_file *stream;
863 enum val_prettyprint pretty;
865 char* valaddr = VALUE_CONTENTS (val0);
866 CORE_ADDR address = VALUE_ADDRESS (val0) + VALUE_OFFSET (val0);
868 ada_to_fixed_type (VALUE_TYPE (val0), valaddr, address, NULL);
869 struct value* val = value_from_contents_and_address (type, valaddr, address);
871 /* If it is a pointer, indicate what it points to. */
872 if (TYPE_CODE (type) == TYPE_CODE_PTR ||
873 TYPE_CODE (type) == TYPE_CODE_REF)
875 /* Hack: remove (char *) for char strings. Their
876 type is indicated by the quoted string anyway. */
877 if (TYPE_CODE (type) == TYPE_CODE_PTR &&
878 TYPE_LENGTH (TYPE_TARGET_TYPE (type)) == sizeof(char) &&
879 TYPE_CODE (TYPE_TARGET_TYPE (type)) == TYPE_CODE_INT &&
880 !TYPE_UNSIGNED (TYPE_TARGET_TYPE (type)))
886 fprintf_filtered (stream, "(");
887 type_print (type, "", stream, -1);
888 fprintf_filtered (stream, ") ");
891 else if (ada_is_array_descriptor (type))
893 fprintf_filtered (stream, "(");
894 type_print (type, "", stream, -1);
895 fprintf_filtered (stream, ") ");
897 else if (ada_is_bogus_array_descriptor (type))
899 fprintf_filtered (stream, "(");
900 type_print (type, "", stream, -1);
901 fprintf_filtered (stream, ") (...?)");
904 return (val_print (type, VALUE_CONTENTS (val), 0, address,
905 stream, format, 1, 0, pretty));
909 print_record (type, valaddr, stream, format, recurse, pretty)
912 struct ui_file *stream;
915 enum val_prettyprint pretty;
917 CHECK_TYPEDEF (type);
919 fprintf_filtered (stream, "(");
921 if (print_field_values (type, valaddr, stream, format, recurse, pretty,
922 0, type, valaddr) != 0
925 fprintf_filtered (stream, "\n");
926 print_spaces_filtered (2 * recurse, stream);
929 fprintf_filtered (stream, ")");
932 /* Print out fields of value at VALADDR having structure type TYPE.
934 TYPE, VALADDR, STREAM, FORMAT, RECURSE, and PRETTY have the
935 same meanings as in ada_print_value and ada_val_print.
937 OUTER_TYPE and OUTER_VALADDR give type and address of enclosing record
938 (used to get discriminant values when printing variant parts).
940 COMMA_NEEDED is 1 if fields have been printed at the current recursion
941 level, so that a comma is needed before any field printed by this
944 Returns 1 if COMMA_NEEDED or any fields were printed. */
947 print_field_values (type, valaddr, stream, format, recurse, pretty,
948 comma_needed, outer_type, outer_valaddr)
951 struct ui_file *stream;
954 enum val_prettyprint pretty;
956 struct type *outer_type;
961 len = TYPE_NFIELDS (type);
963 for (i = 0; i < len; i += 1)
965 if (ada_is_ignored_field (type, i))
968 if (ada_is_wrapper_field (type, i))
971 print_field_values (TYPE_FIELD_TYPE (type, i),
973 + TYPE_FIELD_BITPOS (type, i) / HOST_CHAR_BIT,
974 stream, format, recurse, pretty,
975 comma_needed, type, valaddr);
978 else if (ada_is_variant_part (type, i))
981 print_variant_part (type, i, valaddr,
982 stream, format, recurse, pretty, comma_needed,
983 outer_type, outer_valaddr);
988 fprintf_filtered (stream, ", ");
993 fprintf_filtered (stream, "\n");
994 print_spaces_filtered (2 + 2 * recurse, stream);
998 wrap_here (n_spaces (2 + 2 * recurse));
1002 if (TYPE_CODE (TYPE_FIELD_TYPE (type, i)) == TYPE_CODE_PTR)
1003 fputs_filtered ("\"( ptr \"", stream);
1005 fputs_filtered ("\"( nodef \"", stream);
1006 fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
1007 language_cplus, DMGL_NO_OPTS);
1008 fputs_filtered ("\" \"", stream);
1009 fprintf_symbol_filtered (stream, TYPE_FIELD_NAME (type, i),
1010 language_cplus, DMGL_NO_OPTS);
1011 fputs_filtered ("\") \"", stream);
1015 annotate_field_begin (TYPE_FIELD_TYPE (type, i));
1016 fprintf_filtered (stream, "%.*s",
1017 ada_name_prefix_len (TYPE_FIELD_NAME (type, i)),
1018 TYPE_FIELD_NAME (type, i));
1019 annotate_field_name_end ();
1020 fputs_filtered (" => ", stream);
1021 annotate_field_value ();
1024 if (TYPE_FIELD_PACKED (type, i))
1028 /* Bitfields require special handling, especially due to byte
1030 if (TYPE_CPLUS_SPECIFIC (type) != NULL
1031 && TYPE_FIELD_IGNORE (type, i))
1033 fputs_filtered ("<optimized out or zero length>", stream);
1037 int bit_pos = TYPE_FIELD_BITPOS (type, i);
1038 int bit_size = TYPE_FIELD_BITSIZE (type, i);
1040 adjust_type_signedness (TYPE_FIELD_TYPE (type, i));
1041 v = ada_value_primitive_packed_val (NULL, valaddr,
1042 bit_pos / HOST_CHAR_BIT,
1043 bit_pos % HOST_CHAR_BIT,
1045 TYPE_FIELD_TYPE (type, i));
1046 val_print (TYPE_FIELD_TYPE(type, i), VALUE_CONTENTS (v), 0, 0,
1047 stream, format, 0, recurse + 1, pretty);
1051 ada_val_print (TYPE_FIELD_TYPE (type, i),
1052 valaddr + TYPE_FIELD_BITPOS (type, i) / HOST_CHAR_BIT,
1053 0, 0, stream, format, 0, recurse + 1, pretty);
1054 annotate_field_end ();
1057 return comma_needed;