diff options
author | Markus Deuling <deuling@de.ibm.com> | 2008-02-28 19:10:42 +0000 |
---|---|---|
committer | Markus Deuling <deuling@de.ibm.com> | 2008-02-28 19:10:42 +0000 |
commit | a7dfd0102bbf259cad78b322915523adb366837a (patch) | |
tree | 1a0f57f826707f31ddb19642c0df8e258aae8fbe /gdb | |
parent | 258c00ccb0ca7ed81df2fd226ae2a36008b7df60 (diff) | |
download | gdb-a7dfd0102bbf259cad78b322915523adb366837a.zip gdb-a7dfd0102bbf259cad78b322915523adb366837a.tar.gz gdb-a7dfd0102bbf259cad78b322915523adb366837a.tar.bz2 |
* f-typeprint.c (f_print_type): Handle NULL pointer in VARSTRING
properly.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/f-typeprint.c | 13 |
2 files changed, 13 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 5be237f..7d60a94 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2008-02-28 Markus Deuling <deuling@de.ibm.com> + + * f-typeprint.c (f_print_type): Handle NULL pointer in VARSTRING + properly. + 2008-02-28 Tom Tromey <tromey@redhat.com> * infcmd.c (notice_args_read): Print result of get_inferior_args. diff --git a/gdb/f-typeprint.c b/gdb/f-typeprint.c index 436a1ae..d55c165 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 |