harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r523612 - in /harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/windows: hysignal.c hysignal.h
Date Thu, 29 Mar 2007 07:57:47 GMT
Author: apetrenko
Date: Thu Mar 29 00:57:46 2007
New Revision: 523612

URL: http://svn.apache.org/viewvc?view=rev&rev=523612
Log:
The patch for HARMONY-3124 has been reverted by request of Aleksey Ignatenko.
He is going to prepare a better patch.

Modified:
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/windows/hysignal.c
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/windows/hysignal.h

Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/windows/hysignal.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/windows/hysignal.c?view=diff&rev=523612&r1=523611&r2=523612
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/windows/hysignal.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/windows/hysignal.c
Thu Mar 29 00:57:46 2007
@@ -23,8 +23,6 @@
 #endif /* HY_NO_THR */
 #include "hythread.h"
 #include "hysignal.h"
-#include <stdio.h>
-#include <DbgHelp.h>
 
 typedef struct HyWin32AsyncHandlerRecord
 {
@@ -321,54 +319,6 @@
 }
 
 #undef CDEV_CURRENT_FUNCTION
-static void
-genMiniDumpFile (EXCEPTION_POINTERS * exceptionInfo, char* dumpInfo)
-{
-  typedef BOOL (WINAPI * MINIDUMPPROC)(HANDLE /*hProcess*/, DWORD /*ProcessId*/,
-    HANDLE /*hFile*/, MINIDUMP_TYPE /*DumpType*/, PMINIDUMP_EXCEPTION_INFORMATION /*ExceptionParam*/,
-    PMINIDUMP_USER_STREAM_INFORMATION /*UserStreamParam*/, PMINIDUMP_CALLBACK_INFORMATION
/*CallbackParam*/);
-  MINIDUMPPROC _MiniDumpWriteDump = NULL;
-  HANDLE dmpFile = 0;
-  DWORD uv = 0;
-  char dumpFileName[64] = {0};
-  HMODULE dbghLib = NULL;
-  BOOL res = FALSE;
-	MINIDUMP_EXCEPTION_INFORMATION mei;
-
-  dbghLib = LoadLibrary( "DBGHELP.DLL");
-  if (!dbghLib){
-    sprintf(dumpInfo, "Failed to load DbgHelp library.");
-    return;
-  }
-  _MiniDumpWriteDump = (MINIDUMPPROC)GetProcAddress(dbghLib, "MiniDumpWriteDump");
-  if (!_MiniDumpWriteDump){
-    sprintf(dumpInfo, "Failed to load DbgHelp library.");
-    return;
-  }
-
-  uv = GetTickCount();
-  sprintf(dumpFileName, "hydump_%d.dmp", uv);
-  dmpFile = CreateFile(dumpFileName, GENERIC_WRITE, 0, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL,
0);
-  if (dmpFile == INVALID_HANDLE_VALUE){
-    sprintf(dumpInfo, "Failed to create dump file: .%s", dumpFileName);
-    return;
-  }
-
-	mei.ThreadId = GetCurrentThreadId();
-	mei.ExceptionPointers = exceptionInfo;
-	mei.ClientPointers = TRUE;
-
-	res = _MiniDumpWriteDump( GetCurrentProcess(), GetCurrentProcessId(), dmpFile, MiniDumpNormal,
&mei, 0, 0 );
-  if (!res){
-    sprintf(dumpInfo, "Failed generate dump file.");
-  }
-  else{
-    char dir[_MAX_PATH] = {0};
-    GetCurrentDirectory( _MAX_PATH, dir);
-    sprintf(dumpInfo, "%s\\%s", dir, dumpFileName);
-  }
-	CloseHandle(dmpFile);
-}
 
 #define CDEV_CURRENT_FUNCTION structuredExceptionHandler
 int
@@ -483,7 +433,7 @@
   hyinfo->handlerAddress2 = (void *) structuredExceptionHandler;
   hyinfo->ExceptionRecord = exceptionInfo->ExceptionRecord;
   hyinfo->ContextRecord = exceptionInfo->ContextRecord;
-  genMiniDumpFile(exceptionInfo, hyinfo->dumpInfo);
+
   /* module info is filled on demand */
 }
 
@@ -718,10 +668,6 @@
       *name = "Offset_in_DLL";
       *value = &info->offsetInDLL;
       return HYPORT_SIG_VALUE_32;
-    case 3:
-      *name = "Dumpfile";
-      *value = &info->dumpInfo;
-      return HYPORT_SIG_VALUE_STRING;
     default:
       return HYPORT_SIG_VALUE_UNDEFINED;
     }

Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/windows/hysignal.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/windows/hysignal.h?view=diff&rev=523612&r1=523611&r2=523612
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/windows/hysignal.h
(original)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/windows/hysignal.h
Thu Mar 29 00:57:46 2007
@@ -30,7 +30,6 @@
   void *moduleBaseAddress;
   U_32 offsetInDLL;
   char moduleName[_MAX_PATH];
-  char dumpInfo[_MAX_PATH];
 } HyWin32SignalInfo;
 
 #endif /* hysignal_h */



Mime
View raw message