Explicitly add the executable directory to the windbg search path
This commit is contained in:
parent
3cf479fff8
commit
e5648eae9d
1 changed files with 21 additions and 4 deletions
|
|
@ -445,12 +445,27 @@ public:
|
|||
T* Ptr;
|
||||
};
|
||||
|
||||
static std::wstring GetExeFilename()
|
||||
{
|
||||
wchar_t buffer[1024] = {};
|
||||
if (GetModuleFileName(0, buffer, 1024) == FALSE)
|
||||
return {};
|
||||
return buffer;
|
||||
}
|
||||
|
||||
static std::wstring GetExePath()
|
||||
{
|
||||
std::wstring exePath = GetExeFilename();
|
||||
size_t pos = exePath.find_last_of(L"/\\");
|
||||
if (pos == std::wstring::npos)
|
||||
return {};
|
||||
exePath.resize(pos);
|
||||
return exePath;
|
||||
}
|
||||
|
||||
static std::wstring GetPdbFilename()
|
||||
{
|
||||
wchar_t exeFilename[1024] = {};
|
||||
if (GetModuleFileName(0, exeFilename, 1024) == FALSE)
|
||||
return {};
|
||||
std::wstring pdbFilename = exeFilename;
|
||||
std::wstring pdbFilename = GetExeFilename();
|
||||
pdbFilename.resize(pdbFilename.size() - 3);
|
||||
pdbFilename += L"pdb";
|
||||
return pdbFilename;
|
||||
|
|
@ -486,6 +501,8 @@ void I_AddMinidumpCallstack(const FString& minidumpFilename, FString& text, FStr
|
|||
if (FAILED(result))
|
||||
return;
|
||||
|
||||
symbols->AppendSymbolPathWide(GetExePath().c_str());
|
||||
|
||||
result = client->OpenDumpFileWide(minidumpFilename.WideString().c_str(), 0);
|
||||
if (FAILED(result))
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue