diff options
author | Tom Tromey <tom@tromey.com> | 2020-04-01 14:09:52 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2020-04-01 14:09:53 -0600 |
commit | 981c08ce72f5b8729381ddebf2f3fe5f1e000638 (patch) | |
tree | 30b053f9551c0ed8a5df73d42b09385ed5f271b8 /gdb/testsuite/gdb.compile | |
parent | 4c99290df04ba757b74a21ac5a6d16fe300e49ed (diff) | |
download | gdb-981c08ce72f5b8729381ddebf2f3fe5f1e000638.zip gdb-981c08ce72f5b8729381ddebf2f3fe5f1e000638.tar.gz gdb-981c08ce72f5b8729381ddebf2f3fe5f1e000638.tar.bz2 |
Change how complex types are printed in C
GCC accepts the "i" suffix for complex numbers. I think this is nicer
to read than the current output, so this patch changes the C code to
print complex numbers this way.
gdb/ChangeLog
2020-04-01 Tom Tromey <tom@tromey.com>
* c-valprint.c (c_decorations): Change complex suffix to "i".
gdb/testsuite/ChangeLog
2020-04-01 Tom Tromey <tom@tromey.com>
* gdb.compile/compile.exp: Update.
* gdb.compile/compile-cplus.exp: Update.
* gdb.base/varargs.exp: Update.
* gdb.base/floatn.exp: Update.
* gdb.base/endianity.exp: Update.
* gdb.base/callfuncs.exp (do_function_calls): Update.
* gdb.base/funcargs.exp (complex_args, complex_integral_args)
(complex_float_integral_args): Update.
* gdb.base/complex.exp: Update.
* gdb.base/complex-parts.exp: Update.
Diffstat (limited to 'gdb/testsuite/gdb.compile')
-rw-r--r-- | gdb/testsuite/gdb.compile/compile-cplus.exp | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.compile/compile.exp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.compile/compile-cplus.exp b/gdb/testsuite/gdb.compile/compile-cplus.exp index ffc62ea..cca5b20 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus.exp @@ -219,7 +219,7 @@ gdb_test "print struct_object.arrayfield" \ " = \\{0, 0, 7, 0, 0\\}" gdb_test_no_output "compile code struct_object.complexfield = 7 + 5i" -gdb_test "print struct_object.complexfield" " = 7 \\+ 5 \\* I" +gdb_test "print struct_object.complexfield" " = 7 \\+ 5i" gdb_test_no_output "compile code struct_object.boolfield = 1" gdb_test "print struct_object.boolfield" " = true" diff --git a/gdb/testsuite/gdb.compile/compile.exp b/gdb/testsuite/gdb.compile/compile.exp index 9ad4181..d9c3e66 100644 --- a/gdb/testsuite/gdb.compile/compile.exp +++ b/gdb/testsuite/gdb.compile/compile.exp @@ -237,7 +237,7 @@ if {$skip_struct_object} { " = \\{0, 0, 7, 0, 0\\}" gdb_test_no_output "compile code struct_object.complexfield = 7 + 5i" - gdb_test "print struct_object.complexfield" " = 7 \\+ 5 \\* I" + gdb_test "print struct_object.complexfield" " = 7 \\+ 5i" gdb_test_no_output "compile code struct_object.boolfield = 1" gdb_test "print struct_object.boolfield" " = true" |