diff options
author | Daniel Jacobowitz <dan@debian.org> | 2002-02-05 21:41:29 +0000 |
---|---|---|
committer | Daniel Jacobowitz <dan@debian.org> | 2002-02-05 21:41:29 +0000 |
commit | aca56892d417c17590823f186e337f2b3e7b1269 (patch) | |
tree | 1c4ea3af24459cc8c7bcabbc75872abc830c082b /gdb/c-valprint.c | |
parent | 9e93f657070562fcd7c8f62e019a346a901fe20e (diff) | |
download | gdb-aca56892d417c17590823f186e337f2b3e7b1269.tar.gz |
2002-02-05 Daniel Jacobowitz <drow@mvista.com>
* c-valprint.c (c_val_print): Handle TYPE_CODE_COMPLEX.
Diffstat (limited to 'gdb/c-valprint.c')
-rw-r--r-- | gdb/c-valprint.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c index c094a17ad88..9361067ceaa 100644 --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c @@ -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)); } |