diff options
author | Michael Snyder <msnyder@vmware.com> | 2011-03-10 20:24:27 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2011-03-10 20:24:27 +0000 |
commit | 00b8699cdc7de068a63d532cab934dbb31a029fb (patch) | |
tree | ec26a8a490d74409bc029442a07bbde6e1e7145c /gdb/p-typeprint.c | |
parent | f8f67713c0d407e587ca56ff0db9b3297c1f2667 (diff) | |
download | fsf-binutils-gdb-00b8699cdc7de068a63d532cab934dbb31a029fb.zip fsf-binutils-gdb-00b8699cdc7de068a63d532cab934dbb31a029fb.tar.gz fsf-binutils-gdb-00b8699cdc7de068a63d532cab934dbb31a029fb.tar.bz2 |
2011-03-01 Michael Snyder <msnyder@vmware.com>
* p-typeprint.c (pascal_type_print_method_args): Don't use
pointer until after null-check.
Diffstat (limited to 'gdb/p-typeprint.c')
-rw-r--r-- | gdb/p-typeprint.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gdb/p-typeprint.c b/gdb/p-typeprint.c index 54a761d..fb3f3a1 100644 --- a/gdb/p-typeprint.c +++ b/gdb/p-typeprint.c @@ -156,18 +156,18 @@ void pascal_type_print_method_args (char *physname, char *methodname, struct ui_file *stream) { - int is_constructor = (strncmp (physname, "__ct__", 6) == 0); - int is_destructor = (strncmp (physname, "__dt__", 6) == 0); - - if (is_constructor || is_destructor) - { - physname += 6; - } - fputs_filtered (methodname, stream); if (physname && (*physname != 0)) { + int is_constructor = (strncmp (physname, "__ct__", 6) == 0); + int is_destructor = (strncmp (physname, "__dt__", 6) == 0); + + if (is_constructor || is_destructor) + { + physname += 6; + } + fputs_filtered (" (", stream); /* We must demangle this. */ while (isdigit (physname[0])) |