diff --git a/x64_dbg.sln b/x64_dbg.sln index f261725e..fe287546 100644 --- a/x64_dbg.sln +++ b/x64_dbg.sln @@ -7,8 +7,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "x64_dbg_exe", "x64_dbg_exe\ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "x64_dbg_dbg", "x64_dbg_dbg\x64_dbg_dbg.vcxproj", "{E6548308-401E-3A8A-5819-905DB90522A6}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "x64_dbg_crash", "x64_dbg_crash\x64_dbg_crash.vcxproj", "{E28BFD48-D02F-9A8A-154D-21E1B221AD2F}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Release|Win32 = Release|Win32 @@ -27,10 +25,6 @@ Global {E6548308-401E-3A8A-5819-905DB90522A6}.Release|Win32.Build.0 = Release|Win32 {E6548308-401E-3A8A-5819-905DB90522A6}.Release|x64.ActiveCfg = Release|x64 {E6548308-401E-3A8A-5819-905DB90522A6}.Release|x64.Build.0 = Release|x64 - {E28BFD48-D02F-9A8A-154D-21E1B221AD2F}.Release|Win32.ActiveCfg = Release|Win32 - {E28BFD48-D02F-9A8A-154D-21E1B221AD2F}.Release|Win32.Build.0 = Release|Win32 - {E28BFD48-D02F-9A8A-154D-21E1B221AD2F}.Release|x64.ActiveCfg = Release|x64 - {E28BFD48-D02F-9A8A-154D-21E1B221AD2F}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/x64_dbg.workspace b/x64_dbg.workspace index 7bb2fbf6..e48a355d 100644 --- a/x64_dbg.workspace +++ b/x64_dbg.workspace @@ -2,7 +2,6 @@ - diff --git a/x64_dbg_crash/x64_dbg_crash.cbp b/x64_dbg_crash/x64_dbg_crash.cbp deleted file mode 100644 index 9c35877d..00000000 --- a/x64_dbg_crash/x64_dbg_crash.cbp +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - diff --git a/x64_dbg_crash/x64_dbg_crash.cpp b/x64_dbg_crash/x64_dbg_crash.cpp deleted file mode 100644 index d85bae67..00000000 --- a/x64_dbg_crash/x64_dbg_crash.cpp +++ /dev/null @@ -1,75 +0,0 @@ -#define _WIN32_WINNT 0x0500 - -#include -#include -#include "x64_dbg_crash.h" -#include "..\x64_dbg_dbg\dbghelp\dbghelp.h" - -static char szDumpPath[MAX_PATH]=""; - -static LONG WINAPI UnhandledException(EXCEPTION_POINTERS* pExceptionPointers) -{ - unsigned int ExceptionCode=pExceptionPointers->ExceptionRecord->ExceptionCode; - - if(ExceptionCode==0x40010006) - return EXCEPTION_EXECUTE_HANDLER; - - char szFileName[MAX_PATH]; -#ifdef _WIN64 - const char* szAppName = "x64_dbg"; -#else - const char* szAppName = "x32_dbg"; -#endif //_WIN64 - HANDLE hDumpFile; - SYSTEMTIME stLocalTime; - MINIDUMP_EXCEPTION_INFORMATION ExpParam; - - GetLocalTime( &stLocalTime ); - - CreateDirectoryA(szDumpPath, 0); - - sprintf(szFileName, "%s\\%s-%04d%02d%02d-%02d%02d%02d-%ld-%ld.dmp", - szDumpPath, szAppName, - stLocalTime.wYear, stLocalTime.wMonth, stLocalTime.wDay, - stLocalTime.wHour, stLocalTime.wMinute, stLocalTime.wSecond, - GetCurrentProcessId(), GetCurrentThreadId()); - - hDumpFile = CreateFile(szFileName, GENERIC_READ|GENERIC_WRITE, - FILE_SHARE_WRITE|FILE_SHARE_READ, 0, CREATE_ALWAYS, 0, 0); - - ExpParam.ThreadId = GetCurrentThreadId(); - ExpParam.ExceptionPointers = pExceptionPointers; - ExpParam.ClientPointers = TRUE; - - MiniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(), - hDumpFile, MiniDumpWithDataSegs, &ExpParam, NULL, NULL); - - /*char szMessage[256]=""; - - sprintf(szMessage, "Exception code: 0x%.8X\n\nCrash dump written to:\n%s", ExceptionCode, szFileName); - - MessageBoxA(0, szMessage, "Fatal Exception!", MB_ICONERROR|MB_SYSTEMMODAL); - - ExitProcess(ExceptionCode);*/ - - return EXCEPTION_EXECUTE_HANDLER; -} - -__declspec(dllexport) void InitCrashHandler() //dummy function -{ -} - -extern "C" __declspec(dllexport) BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) -{ - if(fdwReason==DLL_PROCESS_ATTACH) - { - int len=GetModuleFileNameA(hinstDLL, szDumpPath, MAX_PATH); - while(szDumpPath[len]!='\\' && len) - len--; - if(len) - szDumpPath[len]=0; - strcat(szDumpPath, "\\crashdumps"); - AddVectoredExceptionHandler(0, UnhandledException); - } - return TRUE; -} diff --git a/x64_dbg_crash/x64_dbg_crash.h b/x64_dbg_crash/x64_dbg_crash.h deleted file mode 100644 index 4f49c1c3..00000000 --- a/x64_dbg_crash/x64_dbg_crash.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef _X64_DBG_CRASH_H -#define _X64_DBG_CRASH_H - -#ifdef __cplusplus -extern "C" -{ -#endif - -__declspec(dllexport) void InitCrashHandler(); - -#ifdef __cplusplus -} -#endif - -#endif //_X64_DBG_CRASH_H \ No newline at end of file diff --git a/x64_dbg_crash/x64_dbg_crash.vcxproj b/x64_dbg_crash/x64_dbg_crash.vcxproj deleted file mode 100644 index d4344de8..00000000 --- a/x64_dbg_crash/x64_dbg_crash.vcxproj +++ /dev/null @@ -1,86 +0,0 @@ - - - - - Release - Win32 - - - Release - x64 - - - - - - - - - - Win32Proj - - - - DynamicLibrary - false - - - DynamicLibrary - false - - - - - - - - - - - - - true - $(SolutionDir)bin\x32 - $(Platform)\$(Configuration)\ - x32_crash - - - true - $(SolutionDir)bin\x64 - x64_crash - - - - WIN32;NDEBUG;_WINDOWS;_USRDLL;X64_DBG_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - Level3 - ProgramDatabase - - - MachineX86 - true - Windows - true - true - $(SolutionDir)x64_dbg_dbg\dbghelp\dbghelp_x86.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - WIN32;NDEBUG;_WINDOWS;_USRDLL;X64_DBG_EXPORTS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - Level3 - ProgramDatabase - - - true - Windows - true - true - $(SolutionDir)x64_dbg_dbg\dbghelp\dbghelp_x64.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - - - - \ No newline at end of file diff --git a/x64_dbg_crash/x64_dbg_crash.vcxproj.filters b/x64_dbg_crash/x64_dbg_crash.vcxproj.filters deleted file mode 100644 index 2f190ca5..00000000 --- a/x64_dbg_crash/x64_dbg_crash.vcxproj.filters +++ /dev/null @@ -1,27 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav - - - - - Source Files - - - - - Header Files - - - \ No newline at end of file diff --git a/x64_dbg_crash/x64_dbg_crash.vcxproj.user b/x64_dbg_crash/x64_dbg_crash.vcxproj.user deleted file mode 100644 index 695b5c78..00000000 --- a/x64_dbg_crash/x64_dbg_crash.vcxproj.user +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/x64_dbg_exe/x64_dbg_exe.cbp b/x64_dbg_exe/x64_dbg_exe.cbp index 9c535d82..ac7618b5 100644 --- a/x64_dbg_exe/x64_dbg_exe.cbp +++ b/x64_dbg_exe/x64_dbg_exe.cbp @@ -17,7 +17,6 @@ - @@ -32,7 +31,6 @@ - diff --git a/x64_dbg_exe/x64_dbg_exe.cpp b/x64_dbg_exe/x64_dbg_exe.cpp index e44f5809..cab3d96e 100644 --- a/x64_dbg_exe/x64_dbg_exe.cpp +++ b/x64_dbg_exe/x64_dbg_exe.cpp @@ -6,7 +6,6 @@ int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) { - InitCrashHandler(); const char* errormsg=BridgeInit(); if(errormsg) { diff --git a/x64_dbg_exe/x64_dbg_exe.vcxproj b/x64_dbg_exe/x64_dbg_exe.vcxproj index 7be01086..934493ca 100644 --- a/x64_dbg_exe/x64_dbg_exe.vcxproj +++ b/x64_dbg_exe/x64_dbg_exe.vcxproj @@ -65,7 +65,7 @@ Windows true true - $(SolutionDir)bin\x32\x32_crash.lib;$(SolutionDir)bin\x32\x32_bridge.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + $(SolutionDir)bin\x32\x32_bridge.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) $(TargetDir)$(TargetName)_exe.pdb @@ -81,7 +81,7 @@ Windows true true - $(SolutionDir)bin\x64\x64_crash.lib;$(SolutionDir)bin\x64\x64_bridge.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + $(SolutionDir)bin\x64\x64_bridge.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) $(TargetDir)$(TargetName)_exe.pdb diff --git a/x64_dbg_gui/Project/Src/BasicView/SymbolView.cpp b/x64_dbg_gui/Project/Src/BasicView/SymbolView.cpp index 1caa1ef6..33fcc6d0 100644 --- a/x64_dbg_gui/Project/Src/BasicView/SymbolView.cpp +++ b/x64_dbg_gui/Project/Src/BasicView/SymbolView.cpp @@ -78,13 +78,6 @@ void SymbolView::moduleSelectionChanged(int index) void SymbolView::updateSymbolList(int module_count, SYMBOLMODULEINFO* modules) { - if(!module_count) - { - mModuleList->setRowCount(0); - mModuleList->reloadData(); - this->moduleSelectionChanged(0); - return; - } mModuleList->setRowCount(module_count); for(int i=0; isetCellContent(wI, 4, comment); } mHardBPTable->reloadData(); - BridgeFree(wBPList.bp); + if(wBPList.count) + BridgeFree(wBPList.bp); // Software DbgGetBpList(bp_normal, &wBPList); @@ -122,7 +123,8 @@ void BreakpointsView::reloadData() mSoftBPTable->setCellContent(wI, 4, comment); } mSoftBPTable->reloadData(); - BridgeFree(wBPList.bp); + if(wBPList.count) + BridgeFree(wBPList.bp); // Memory DbgGetBpList(bp_memory, &wBPList); @@ -153,7 +155,8 @@ void BreakpointsView::reloadData() mSoftBPTable->setCellContent(wI, 4, comment); } mMemBPTable->reloadData(); - BridgeFree(wBPList.bp); + if(wBPList.count) + BridgeFree(wBPList.bp); }