DBG: unicode fap + display full path in memory map (extensible with an option later)
This commit is contained in:
parent
5b57e2a6c9
commit
8c0a28b35f
|
@ -12,6 +12,7 @@ debug/
|
|||
doxygen*/
|
||||
doc/
|
||||
COV/
|
||||
minidump/
|
||||
|
||||
# Global filetypes to ignore
|
||||
*.depend
|
||||
|
|
|
@ -929,7 +929,7 @@ static void cbLoadDll(LOAD_DLL_DEBUG_INFO* LoadDll)
|
|||
|
||||
if((bBreakOnNextDll || settingboolget("Events", "DllEntry")) && !bAlreadySetEntry)
|
||||
{
|
||||
duint oep = GetPE32Data(DLLDebugFileName, 0, UE_OEP);
|
||||
duint oep = GetPE32DataW(StringUtils::Utf8ToUtf16(DLLDebugFileName).c_str(), 0, UE_OEP);
|
||||
if(oep)
|
||||
{
|
||||
char command[256] = "";
|
||||
|
@ -1463,7 +1463,7 @@ DWORD WINAPI threadAttachLoop(void* lpParameter)
|
|||
static PROCESS_INFORMATION pi_attached;
|
||||
fdProcessInfo = &pi_attached;
|
||||
//do some init stuff
|
||||
bFileIsDll = IsFileDLL(szFileName, 0);
|
||||
bFileIsDll = IsFileDLLW(StringUtils::Utf8ToUtf16(szFileName).c_str(), 0);
|
||||
GuiAddRecentFile(szFileName);
|
||||
ecount = 0;
|
||||
//NOTE: set custom handlers
|
||||
|
|
|
@ -73,7 +73,7 @@ static bool readwritejitkey(wchar_t* jit_key_value, DWORD* jit_key_vale_size, ch
|
|||
|
||||
if (write)
|
||||
{
|
||||
lRv = RegCreateKeyEx(HKEY_LOCAL_MACHINE, JIT_REG_KEY, 0, NULL, REG_OPTION_NON_VOLATILE, key_flags, NULL, &hKey, &dwDisposition);
|
||||
lRv = RegCreateKeyExW(HKEY_LOCAL_MACHINE, JIT_REG_KEY, 0, NULL, REG_OPTION_NON_VOLATILE, key_flags, NULL, &hKey, &dwDisposition);
|
||||
if (lRv != ERROR_SUCCESS)
|
||||
return false;
|
||||
|
||||
|
@ -81,7 +81,7 @@ static bool readwritejitkey(wchar_t* jit_key_value, DWORD* jit_key_vale_size, ch
|
|||
}
|
||||
else
|
||||
{
|
||||
lRv = RegOpenKeyEx(HKEY_LOCAL_MACHINE, JIT_REG_KEY, 0, key_flags, &hKey);
|
||||
lRv = RegOpenKeyExW(HKEY_LOCAL_MACHINE, JIT_REG_KEY, 0, key_flags, &hKey);
|
||||
if (lRv != ERROR_SUCCESS)
|
||||
{
|
||||
if (error != NULL)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include "_global.h"
|
||||
|
||||
#define ATTACH_CMD_LINE "\" -a %ld -e %ld"
|
||||
#define JIT_REG_KEY TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug")
|
||||
#define JIT_REG_KEY L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug"
|
||||
|
||||
#define JIT_ENTRY_MAX_SIZE 512
|
||||
#define JIT_ENTRY_DEF_SIZE (MAX_PATH + sizeof(ATTACH_CMD_LINE) + 2)
|
||||
|
|
|
@ -53,17 +53,16 @@ void MemUpdateMap()
|
|||
if (!ModNameFromAddr(pageStart, curPage.info, true))
|
||||
{
|
||||
// Module lookup failed; check if it's a file mapping
|
||||
wchar_t szMappedName[sizeof(curPage.info)] = L"";
|
||||
if ((mbi.Type == MEM_MAPPED) &&
|
||||
(GetMappedFileName(fdProcessInfo->hProcess, mbi.AllocationBase, curPage.info, MAX_MODULE_SIZE) != 0))
|
||||
(GetMappedFileNameW(fdProcessInfo->hProcess, mbi.AllocationBase, szMappedName, MAX_MODULE_SIZE) != 0))
|
||||
{
|
||||
// Get the file name only
|
||||
char* fileStart = strrchr(curPage.info, '\\');
|
||||
size_t fileLen = strlen(fileStart);
|
||||
|
||||
if (fileStart)
|
||||
memmove(curPage.info, fileStart + 1, fileLen);
|
||||
|
||||
curPage.info[fileLen] = '\0';
|
||||
bool bFileNameOnly = false; //TODO: setting for this
|
||||
auto fileStart = wcsrchr(szMappedName, L'\\');
|
||||
if (bFileNameOnly && fileStart)
|
||||
strcpy_s(curPage.info, StringUtils::Utf16ToUtf8(fileStart + 1).c_str());
|
||||
else
|
||||
strcpy_s(curPage.info, StringUtils::Utf16ToUtf8(szMappedName).c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue