summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2011-03-10 20:25:44 +0000
committerMichael Snyder <msnyder@vmware.com>2011-03-10 20:25:44 +0000
commitc96d965cf2fb9fac4412c20d35312636a239fbda (patch)
treeb234c17a60c976a2cdd7177de096bef43128649a
parent00b8699cdc7de068a63d532cab934dbb31a029fb (diff)
downloadppe42-binutils-c96d965cf2fb9fac4412c20d35312636a239fbda.tar.gz
ppe42-binutils-c96d965cf2fb9fac4412c20d35312636a239fbda.zip
Revert previous change.
-rw-r--r--gdb/ChangeLog3
-rw-r--r--gdb/p-typeprint.c16
2 files changed, 8 insertions, 11 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index a9991eaba0..19a767eaa3 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,8 +1,5 @@
2011-03-10 Michael Snyder <msnyder@vmware.com>
- * 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 fb3f3a14b1..54a761d464 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)
{
- fputs_filtered (methodname, stream);
+ int is_constructor = (strncmp (physname, "__ct__", 6) == 0);
+ int is_destructor = (strncmp (physname, "__dt__", 6) == 0);
- if (physname && (*physname != 0))
+ if (is_constructor || is_destructor)
{
- int is_constructor = (strncmp (physname, "__ct__", 6) == 0);
- int is_destructor = (strncmp (physname, "__dt__", 6) == 0);
+ physname += 6;
+ }
- if (is_constructor || is_destructor)
- {
- physname += 6;
- }
+ fputs_filtered (methodname, stream);
+ if (physname && (*physname != 0))
+ {
fputs_filtered (" (", stream);
/* We must demangle this. */
while (isdigit (physname[0]))
OpenPOWER on IntegriCloud