summaryrefslogtreecommitdiff
path: root/gdb/f-typeprint.c
diff options
context:
space:
mode:
authorMarkus Deuling <deuling@de.ibm.com>2008-02-28 19:10:42 +0000
committerMarkus Deuling <deuling@de.ibm.com>2008-02-28 19:10:42 +0000
commit9918267841c41b81639089b78a04dea18bea42de (patch)
tree868285dd720a9701b024737e244b49000a22fb86 /gdb/f-typeprint.c
parentaf39c9ffcced277b86a09d0107602511f15d2341 (diff)
downloadgdb-9918267841c41b81639089b78a04dea18bea42de.tar.gz
* f-typeprint.c (f_print_type): Handle NULL pointer in VARSTRING
properly.
Diffstat (limited to 'gdb/f-typeprint.c')
-rw-r--r--gdb/f-typeprint.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c
index 436a1ae7423..d55c1657c9c 100644
--- a/gdb/f-typeprint.c
+++ b/gdb/f-typeprint.c
@@ -72,13 +72,16 @@ f_print_type (struct type *type, char *varstring, struct ui_file *stream,
fputs_filtered (" ", stream);
f_type_print_varspec_prefix (type, stream, show, 0);
- fputs_filtered (varstring, stream);
+ if (varstring != NULL)
+ {
+ 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 */
+ /* For demangled function names, we have the arglist as part of the name,
+ so don't print an additional pair of ()'s */
- demangled_args = varstring[strlen (varstring) - 1] == ')';
- f_type_print_varspec_suffix (type, stream, show, 0, demangled_args);
+ demangled_args = varstring[strlen (varstring) - 1] == ')';
+ f_type_print_varspec_suffix (type, stream, show, 0, demangled_args);
+ }
}
/* Print any asterisks or open-parentheses needed before the