subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1340503 - /subversion/trunk/subversion/libsvn_subr/win32_crashrpt.c
Date Sat, 19 May 2012 15:33:46 GMT
Author: rhuijben
Date: Sat May 19 15:33:46 2012
New Revision: 1340503

URL: http://svn.apache.org/viewvc?rev=1340503&view=rev
Log:
Fix a few more minor issues in the Win32 crash report handler.

* subversion/libsvn_subr/win32_crashrpt.c
  (format_value): Initialize tag for failures in SymGetTypeInfo.
    SymTagUDT: Print the right level of indirections.
    SymTagBaseType: Simplify flow.
    default: Print tag decimal. (Typically 0 when PDB not loadable)

Modified:
    subversion/trunk/subversion/libsvn_subr/win32_crashrpt.c

Modified: subversion/trunk/subversion/libsvn_subr/win32_crashrpt.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/win32_crashrpt.c?rev=1340503&r1=1340502&r2=1340503&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/win32_crashrpt.c (original)
+++ subversion/trunk/subversion/libsvn_subr/win32_crashrpt.c Sat May 19 15:33:46 2012
@@ -300,7 +300,7 @@ format_basic_type(char *buf, DWORD basic
 static void
 format_value(char *value_str, DWORD64 mod_base, DWORD type, void *value_addr)
 {
-  DWORD tag;
+  DWORD tag = 0;
   int ptr = 0;
   HANDLE proc = GetCurrentProcess();
 
@@ -335,7 +335,7 @@ format_value(char *value_str, DWORD64 mo
                         type_name, *(DWORD *)value_addr);
               else
                 sprintf(value_str, "(%s **) 0x%08x",
-                        type_name, (DWORD *)value_addr);
+                        type_name, *(DWORD *)value_addr);
 
               free(type_name);
             }
@@ -354,17 +354,14 @@ format_value(char *value_str, DWORD64 mo
             {
               sprintf(value_str, "0x%08x \"%s\"",
                       *(DWORD *)value_addr, (char *)*(DWORD*)value_addr);
-              break;
             }
-          if (ptr >= 1)
+          else if (ptr >= 1)
             {
               sprintf(value_str, "0x%08x", *(DWORD *)value_addr);
-              break;
             }
-          if (SymGetTypeInfo_(proc, mod_base, type, TI_GET_BASETYPE, &bt))
+          else if (SymGetTypeInfo_(proc, mod_base, type, TI_GET_BASETYPE, &bt))
             {
               format_basic_type(value_str, bt, length, value_addr);
-              break;
             }
         }
         break;
@@ -375,7 +372,7 @@ format_value(char *value_str, DWORD64 mo
           sprintf(value_str, "0x%08x", *(DWORD *)value_addr);
           break;
       default:
-          sprintf(value_str, "[unhandled tag: 0x%08x]", tag);
+          sprintf(value_str, "[unhandled tag: %d]", tag);
           break;
     }
 }



Mime
View raw message