[ was: Re: [PATCH v2 3/7] Change how complex types are printed in C ] On 20-03-2020 22:53, Tom Tromey wrote: > 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-03-20 Tom Tromey > > * c-valprint.c (c_decorations): Change complex suffix to "i". > > gdb/testsuite/ChangeLog > 2020-03-20 Tom Tromey > > * 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. > --- > gdb/ChangeLog | 4 ++++ > gdb/c-valprint.c | 2 +- > gdb/testsuite/ChangeLog | 13 +++++++++++++ > gdb/testsuite/gdb.base/callfuncs.exp | 6 +++--- > gdb/testsuite/gdb.base/complex-parts.exp | 6 +++--- > gdb/testsuite/gdb.base/complex.exp | 4 ++-- > gdb/testsuite/gdb.base/endianity.exp | 4 ++-- > gdb/testsuite/gdb.base/floatn.exp | 13 +++++-------- > gdb/testsuite/gdb.base/funcargs.exp | 20 ++++++++++---------- > gdb/testsuite/gdb.base/varargs.exp | 6 +++--- > gdb/testsuite/gdb.compile/compile-cplus.exp | 2 +- > gdb/testsuite/gdb.compile/compile.exp | 2 +- > 12 files changed, 48 insertions(+), 34 deletions(-) > > diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c > index 76a86faea6a..bde9c6cc883 100644 > --- a/gdb/c-valprint.c > +++ b/gdb/c-valprint.c > @@ -121,7 +121,7 @@ static const struct generic_val_print_decorations c_decorations = > { > "", > " + ", > - " * I", > + "i", > "true", > "false", > "void", This broke gdb.fortran/mixed-lang-stack.exp, fixed in patch below. Committed as obvious. Thanks, - Tom