1
0
Fork 0

DBG: separate directory for memory dumps

This commit is contained in:
mrexodia 2016-09-10 14:00:56 +02:00
parent 67d8b296a4
commit be3520f383
No known key found for this signature in database
GPG Key ID: FC89E0AAA0C1AAD8
2 changed files with 4 additions and 3 deletions

View File

@ -2515,7 +2515,7 @@ CMDRESULT cbInstrSavedata(int argc, char* argv[])
String name = argv[1];
if(name == ":memdump:")
name = StringUtils::sprintf("memdump_%X_%p_%x.bin", fdProcessInfo->dwProcessId, addr, size);
name = StringUtils::sprintf("%s\\memdumps\\memdump_%X_%p_%x.bin", szProgramDir, fdProcessInfo->dwProcessId, addr, size);
if(!FileHelper::WriteAllData(name, data(), data.size()))
{

View File

@ -638,11 +638,12 @@ extern "C" DLL_EXPORT const char* _dbg_dbginit()
info.execute = DbgScriptDllExec;
GuiRegisterScriptLanguage(&info);
dputs(QT_TRANSLATE_NOOP("DBG", "Starting command loop..."));
hCommandLoopThread = CreateThread(0, 0, DbgCommandLoopThread, 0, 0, 0);
hCommandLoopThread = CreateThread(nullptr, 0, DbgCommandLoopThread, nullptr, 0, nullptr);
char plugindir[deflen] = "";
strcpy_s(plugindir, szProgramDir);
strcat_s(plugindir, "\\plugins");
CreateDirectoryW(StringUtils::Utf8ToUtf16(plugindir).c_str(), 0);
CreateDirectoryW(StringUtils::Utf8ToUtf16(plugindir).c_str(), nullptr);
CreateDirectoryW(StringUtils::Utf8ToUtf16(StringUtils::sprintf("%s\\memdumps", szProgramDir)).c_str(), nullptr);
dputs(QT_TRANSLATE_NOOP("DBG", "Loading plugins..."));
pluginload(plugindir);
dputs(QT_TRANSLATE_NOOP("DBG", "Handling command line..."));