- case TYPE_CODE_FUNC:
- if (options->format)
- {
- print_scalar_formatted (valaddr + embedded_offset, type,
- options, 0, stream);
- break;
- }
- /* FIXME, we should consider, at least for ANSI C language, eliminating
- the distinction made between FUNCs and POINTERs to FUNCs. */
- fprintf_filtered (stream, "{");
- type_print (type, "", stream, -1);
- fprintf_filtered (stream, "} ");
- /* Try to print what function it points to, and its address. */
- print_address_demangle (gdbarch, address, stream, demangle);
- break;
-
- case TYPE_CODE_BOOL:
- if (options->format || options->output_format)
- {
- struct value_print_options opts = *options;
- opts.format = (options->format ? options->format
- : options->output_format);
- print_scalar_formatted (valaddr + embedded_offset, type,
- &opts, 0, stream);
- }
- else
- {
- val = unpack_long (type, valaddr + embedded_offset);
- if (val == 0)
- fputs_filtered ("FALSE", stream);
- else if (val == 1)
- fputs_filtered ("TRUE", stream);
- else
- fprintf_filtered (stream, "%ld)", (long int) val);
- }
- break;
-
- case TYPE_CODE_RANGE:
- if (TYPE_LENGTH (type) == TYPE_LENGTH (TYPE_TARGET_TYPE (type)))
- {
- m2_val_print (TYPE_TARGET_TYPE (type), valaddr, embedded_offset,
- address, stream, recurse, options);
- break;
- }
- /* FIXME: create_range_type does not set the unsigned bit in a
- range type (I think it probably should copy it from the target
- type), so we won't print values which are too large to
- fit in a signed integer correctly. */
- /* FIXME: Doesn't handle ranges of enums correctly. (Can't just
- print with the target type, though, because the size of our type
- and the target type might differ). */
- /* FALLTHROUGH */
-
- case TYPE_CODE_INT:
- if (options->format || options->output_format)
- {
- struct value_print_options opts = *options;
- opts.format = (options->format ? options->format
- : options->output_format);
- print_scalar_formatted (valaddr + embedded_offset, type,
- &opts, 0, stream);
- }
- else
- val_print_type_code_int (type, valaddr + embedded_offset, stream);
- break;
-
- case TYPE_CODE_CHAR:
- if (options->format || options->output_format)
- {
- struct value_print_options opts = *options;
- opts.format = (options->format ? options->format
- : options->output_format);
- print_scalar_formatted (valaddr + embedded_offset, type,
- &opts, 0, stream);
- }
- else
- {
- val = unpack_long (type, valaddr + embedded_offset);
- if (TYPE_UNSIGNED (type))
- fprintf_filtered (stream, "%u", (unsigned int) val);
- else
- fprintf_filtered (stream, "%d", (int) val);
- fputs_filtered (" ", stream);
- LA_PRINT_CHAR ((unsigned char) val, type, stream);
- }
- break;
-
- case TYPE_CODE_FLT:
- if (options->format)
- print_scalar_formatted (valaddr + embedded_offset, type,
- options, 0, stream);
- else
- print_floating (valaddr + embedded_offset, type, stream);
- break;
-
- case TYPE_CODE_METHOD:
- break;
-
- case TYPE_CODE_BITSTRING: