1
0
Fork 0

DBG: error message when CreateProcess failed + fixed a bug with binary search in the memory map

This commit is contained in:
mrexodia 2016-02-23 02:26:17 +01:00
parent 2c006cdeff
commit 3f4711702d
2 changed files with 3 additions and 6 deletions

View File

@ -1678,7 +1678,7 @@ static void debugLoopFunction(void* lpParameter, bool attach)
if(!fdProcessInfo)
{
fdProcessInfo = &g_pi;
dputs("Error starting process (CreateProcess)!");
dprintf("Error starting process (CreateProcess, %s)!\n", ErrorCodeToName(GetLastError()));
unlock(WAITID_STOP);
return;
}

View File

@ -1266,11 +1266,6 @@ CMDRESULT cbInstrFindAll(int argc, char* argv[])
CMDRESULT cbInstrFindMemAll(int argc, char* argv[])
{
dprintf("argc: %d\n", argc);
for(int i = 0; i < argc; i++)
{
dprintf("%d:\"%s\"\n", i, argv[i]);
}
if(argc < 3)
{
dputs("not enough arguments!");
@ -1310,6 +1305,8 @@ CMDRESULT cbInstrFindMemAll(int argc, char* argv[])
std::vector<SimplePage> searchPages;
for(auto & itr : memoryPages)
{
if(itr.second.mbi.State != MEM_COMMIT)
continue;
SimplePage page(duint(itr.second.mbi.BaseAddress), itr.second.mbi.RegionSize);
if(page.address >= addr && page.address + page.size <= endAddr)
searchPages.push_back(page);