diff options
author | Stu Grossman <grossman@cygnus> | 1998-08-12 15:50:59 +0000 |
---|---|---|
committer | Stu Grossman <grossman@cygnus> | 1998-08-12 15:50:59 +0000 |
commit | 433732f25e8aeb3587a1d4fe612009352cbb880c (patch) | |
tree | 1b458dc0618a6408d4287d09fb3876292232766e /gdb/c-typeprint.c | |
parent | 902459f256a3c49ce2b1b3a778d356042ed3b03f (diff) | |
download | binutils-gdb-433732f25e8aeb3587a1d4fe612009352cbb880c.tar.gz |
* c-typeprint.c (c_print_type): Don't crash if varstring is null.
* expprint.c expression.h (dump_expression): Rename to
dump_prefix_expression.
* Print out the expression in normal form. Call print_longest
instead of trying to do it ourselves.
* (dump_postfix_expression): New function, prints out the expression
with indentation and better formatting and interpretation.
* parse.c (parse_exp_1): Put calls to dump expressions under ifdef
MAINTENANCE_CMDS and expressiondebug variable.
Diffstat (limited to 'gdb/c-typeprint.c')
-rw-r--r-- | gdb/c-typeprint.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gdb/c-typeprint.c b/gdb/c-typeprint.c index 3347050b5c1..689988d2c80 100644 --- a/gdb/c-typeprint.c +++ b/gdb/c-typeprint.c @@ -135,14 +135,16 @@ c_print_type (type, varstring, stream, show, level) fputs_filtered (" ", stream); c_type_print_varspec_prefix (type, stream, show, 0); - fputs_filtered (varstring, stream); - - /* For demangled function names, we have the arglist as part of the name, - so don't print an additional pair of ()'s */ + if (varstring != NULL) + { + fputs_filtered (varstring, stream); - demangled_args = strchr(varstring, '(') != NULL; - c_type_print_varspec_suffix (type, stream, show, 0, demangled_args); + /* For demangled function names, we have the arglist as part of the name, + so don't print an additional pair of ()'s */ + demangled_args = strchr(varstring, '(') != NULL; + c_type_print_varspec_suffix (type, stream, show, 0, demangled_args); + } } /* If TYPE is a derived type, then print out derivation information. |