- adjust_type_signedness (TYPE_FIELD_TYPE (type, i));
- v = ada_value_primitive_packed_val (NULL, valaddr,
- bit_pos / HOST_CHAR_BIT,
- bit_pos % HOST_CHAR_BIT,
- bit_size,
- TYPE_FIELD_TYPE (type, i));
- val_print (TYPE_FIELD_TYPE (type, i), value_contents (v), 0, 0,
- stream, format, 0, recurse + 1, pretty);
- }
+ case TYPE_CODE_FLT:
+ ada_val_print_flt (type, valaddr, offset, offset_aligned,
+ address, stream, recurse, original_value,
+ options, language);
+ break;
+
+ case TYPE_CODE_UNION:
+ case TYPE_CODE_STRUCT:
+ ada_val_print_struct_union (type, valaddr, offset, offset_aligned,
+ address, stream, recurse,
+ original_value, options, language);
+ break;
+
+ case TYPE_CODE_ARRAY:
+ ada_val_print_array (type, valaddr, offset, offset_aligned,
+ address, stream, recurse, original_value,
+ options);
+ return;
+
+ case TYPE_CODE_REF:
+ ada_val_print_ref (type, valaddr, offset, offset_aligned,
+ address, stream, recurse, original_value,
+ options, language);
+ break;
+ }
+}
+
+/* See val_print for a description of the various parameters of this
+ function; they are identical. */
+
+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)
+{
+
+ /* XXX: this catches QUIT/ctrl-c as well. Isn't that busted? */
+ TRY
+ {
+ ada_val_print_1 (type, embedded_offset, address,
+ stream, recurse, val, options,
+ current_language);
+ }
+ CATCH (except, RETURN_MASK_ALL)
+ {
+ }
+ END_CATCH
+}
+
+void
+ada_value_print (struct value *val0, struct ui_file *stream,
+ const struct value_print_options *options)
+{
+ struct value *val = ada_to_fixed_value (val0);
+ CORE_ADDR address = value_address (val);
+ struct type *type = ada_check_typedef (value_enclosing_type (val));
+ struct value_print_options opts;
+
+ /* If it is a pointer, indicate what it points to. */
+ if (TYPE_CODE (type) == TYPE_CODE_PTR)
+ {
+ /* Hack: don't print (char *) for char strings. Their
+ type is indicated by the quoted string anyway. */
+ if (TYPE_LENGTH (TYPE_TARGET_TYPE (type)) != sizeof (char)
+ || TYPE_CODE (TYPE_TARGET_TYPE (type)) != TYPE_CODE_INT
+ || TYPE_UNSIGNED (TYPE_TARGET_TYPE (type)))
+ {
+ fprintf_filtered (stream, "(");
+ type_print (type, "", stream, -1);
+ fprintf_filtered (stream, ") ");
+ }
+ }
+ else if (ada_is_array_descriptor_type (type))
+ {
+ /* We do not print the type description unless TYPE is an array
+ access type (this is encoded by the compiler as a typedef to
+ a fat pointer - hence the check against TYPE_CODE_TYPEDEF). */
+ if (TYPE_CODE (type) == TYPE_CODE_TYPEDEF)
+ {
+ fprintf_filtered (stream, "(");
+ type_print (type, "", stream, -1);
+ fprintf_filtered (stream, ") ");