From: Michael Snyder Date: Thu, 10 Mar 2011 20:24:27 +0000 (+0000) Subject: 2011-03-01 Michael Snyder X-Git-Tag: cgen-snapshot-20110401~306 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=00b8699cdc7de068a63d532cab934dbb31a029fb;p=platform%2Fupstream%2Fbinutils.git 2011-03-01 Michael Snyder * p-typeprint.c (pascal_type_print_method_args): Don't use pointer until after null-check. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 19a767e..a9991ea 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,8 @@ 2011-03-10 Michael Snyder + * p-typeprint.c (pascal_type_print_method_args): Don't use + pointer until after null-check. + * tracepoint.c (cmd_qtv): Discard unused value 'packet'. (cmd_qtframe): Ditto. (cmd_qtbuffer): Ditto. 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]))