2002-02-05 Daniel Jacobowitz <drow@mvista.com>

* c-valprint.c (c_val_print): Handle TYPE_CODE_COMPLEX.
This commit is contained in:
Daniel Jacobowitz 2002-02-05 21:41:29 +00:00
parent cadaa5224a
commit fca9e6033a
2 changed files with 26 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2002-02-05 Daniel Jacobowitz <drow@mvista.com>
* c-valprint.c (c_val_print): Handle TYPE_CODE_COMPLEX.
2002-02-05 Daniel Jacobowitz <drow@mvista.com>
* gdbserver/linux-low.c: Remove unused include files.

View File

@ -463,6 +463,28 @@ c_val_print (struct type *type, char *valaddr, int embedded_offset,
fprintf_filtered (stream, "<incomplete type>");
break;
case TYPE_CODE_COMPLEX:
if (format)
print_scalar_formatted (valaddr + embedded_offset,
TYPE_TARGET_TYPE (type),
format, 0, stream);
else
print_floating (valaddr + embedded_offset, TYPE_TARGET_TYPE (type),
stream);
fprintf_filtered (stream, " + ");
if (format)
print_scalar_formatted (valaddr + embedded_offset
+ TYPE_LENGTH (TYPE_TARGET_TYPE (type)),
TYPE_TARGET_TYPE (type),
format, 0, stream);
else
print_floating (valaddr + embedded_offset
+ TYPE_LENGTH (TYPE_TARGET_TYPE (type)),
TYPE_TARGET_TYPE (type),
stream);
fprintf_filtered (stream, " * I");
break;
default:
error ("Invalid C/C++ type code %d in symbol table.", TYPE_CODE (type));
}