2011-03-01 Michael Snyder <msnyder@vmware.com>
authorMichael Snyder <msnyder@vmware.com>
Thu, 10 Mar 2011 20:24:27 +0000 (20:24 +0000)
committerMichael Snyder <msnyder@vmware.com>
Thu, 10 Mar 2011 20:24:27 +0000 (20:24 +0000)
* p-typeprint.c (pascal_type_print_method_args): Don't use
pointer until after null-check.

gdb/ChangeLog
gdb/p-typeprint.c

index 19a767eaa30914a1cad33fd99df4330cc56dc2c3..a9991eaba0b2857ed74f4070aee0a9b7bead9adc 100644 (file)
@@ -1,5 +1,8 @@
 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.
index 54a761d464a0bb1bf6443f7de477802d483e4e4b..fb3f3a14b1b44d4be968550cf752ce011a431aa7 100644 (file)
@@ -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]))
This page took 0.030022 seconds and 4 git commands to generate.