Skip to content

Commit

Permalink
include code static with MAIN search
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvita committed Aug 12, 2020
1 parent ce67d2a commit ba9cdf2
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions source/guis/gui_cheats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2702,29 +2702,29 @@ void GuiCheats::searchMemoryAddressesPrimary(Debugger *debugger, searchValue_t s
time_t unixTime1 = time(NULL);
printf("%s%lx\n", "Start Time primary search", unixTime1);
// printf("main %lx main end %lx heap %lx heap end %lx \n",m_mainBaseAddr, m_mainBaseAddr+m_mainSize, m_heapBaseAddr, m_heapBaseAddr+m_heapSize);
printf("value1=%lx value2=%lx typesize=%d\n", searchValue1._u64, searchValue2._u64, dataTypeSizes[searchType]);
for (MemoryInfo meminfo : memInfos)
{

// printf("%s%p", "meminfo.addr, ", meminfo.addr);
// printf("%s%p", ", meminfo.end, ", meminfo.addr + meminfo.size);
// printf("%s%p", ", meminfo.size, ", meminfo.size);
// printf("%s%lx", ", meminfo.type, ", meminfo.type);
// printf("%s%lx", ", meminfo.attr, ", meminfo.attr);
// printf("%s%lx", ", meminfo.perm, ", meminfo.perm);
// printf("%s%lx", ", meminfo.device_refcount, ", meminfo.device_refcount);
// printf("%s%lx\n", ", meminfo.ipc_refcount, ", meminfo.ipc_refcount);

if (searchRegion == SEARCH_REGION_HEAP && meminfo.type != MemType_Heap)
continue;
else if (searchRegion == SEARCH_REGION_MAIN &&
(meminfo.type != MemType_CodeWritable && meminfo.type != MemType_CodeMutable))
(meminfo.type != MemType_CodeWritable && meminfo.type != MemType_CodeMutable && meminfo.type != MemType_CodeStatic))
continue;
else if (searchRegion == SEARCH_REGION_HEAP_AND_MAIN &&
(meminfo.type != MemType_Heap && meminfo.type != MemType_CodeWritable && meminfo.type != MemType_CodeMutable))
continue;
else if (searchRegion == SEARCH_REGION_RAM && (meminfo.perm & Perm_Rw) != Perm_Rw)
continue;

// printf("%s%p", "meminfo.addr, ", meminfo.addr);
// printf("%s%p", ", meminfo.end, ", meminfo.addr + meminfo.size);
// printf("%s%p", ", meminfo.size, ", meminfo.size);
// printf("%s%lx", ", meminfo.type, ", meminfo.type);
// printf("%s%lx", ", meminfo.attr, ", meminfo.attr);
// printf("%s%lx", ", meminfo.perm, ", meminfo.perm);
// printf("%s%lx", ", meminfo.device_refcount, ", meminfo.device_refcount);
// printf("%s%lx\n", ", meminfo.ipc_refcount, ", meminfo.ipc_refcount);
setLedState(ledOn);
ledOn = !ledOn;

Expand Down

0 comments on commit ba9cdf2

Please sign in to comment.