aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2002-02-05 21:41:29 +0000
committerDaniel Jacobowitz <drow@false.org>2002-02-05 21:41:29 +0000
commitfca9e6033a164bf34a58031cb59b276bf5412289 (patch)
tree2a9c51c2b3a6b0ece0c49164d2fdf1c50d3c0cda /gdb
parentcadaa5224a27a03e954df59576f41d0f6b75a443 (diff)
downloadgdb-fca9e6033a164bf34a58031cb59b276bf5412289.zip
gdb-fca9e6033a164bf34a58031cb59b276bf5412289.tar.gz
gdb-fca9e6033a164bf34a58031cb59b276bf5412289.tar.bz2
2002-02-05 Daniel Jacobowitz <drow@mvista.com>
* c-valprint.c (c_val_print): Handle TYPE_CODE_COMPLEX.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/c-valprint.c22
2 files changed, 26 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ebe2886..efae737 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,9 @@
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.
2002-02-05 Daniel Jacobowitz <drow@mvista.com>
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
index c094a17..9361067 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));
}