|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
Filipe_Br Master Cheater Reputation: 3
Joined: 07 Jan 2016 Posts: 272 Location: My house
|
Posted: Mon Oct 17, 2016 8:03 am Post subject: debug |
|
|
It's been a good time to use debuggers, bad I have trouble debugging of more than one address.
Code: |
base_addressA = "2fd4657"
base_addressB = "1aef345"
|
How can I debug these two addresses, wherein:
addressA = EAX
addressB = EDI
If it were only 1 for me is quiet 2 more, I can not properly.
|
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Mon Oct 17, 2016 4:19 pm Post subject: |
|
|
You're going to have to give a bit more context if you want help.
Show the instruction(s) you're debugging and the code you've got.
|
|
Back to top |
|
|
Filipe_Br Master Cheater Reputation: 3
Joined: 07 Jan 2016 Posts: 272 Location: My house
|
Posted: Mon Oct 17, 2016 7:02 pm Post subject: |
|
|
I managed to solve the problem.
I tried that. however there was no time address to be debugged.
Code: |
function scanArray(findValue, protectionFlags)
if foundlist then foundlist.destroy() end
if memscan then memscan.destroy() end
memscan = createMemScan()
foundlist = createFoundList(memscan)
memscan.firstScan(soExactValue, vtByteArray, rtTruncated, findValue, nil,
"00000000", "7fffffff", protectionflags,
fsmAligned,"1",
true, false, false, false)
memscan.waitTillDone()
foundlist.initialize()
resultScan = foundlist.Address[0]
memscan.Destroy()
foundlist.Destroy()
return resultScan
end
address_1 = scanArray("F3 0F 7E 51 20 F2 0F 59 D0", "-W+X-C")
address_2 = scanArray("66 0F D6 47 20 8B 53 60", "-W+X-C")
debug_setBreakpoint(address_1)
function debugger_onBreakpoint()
adr1 = ECX
return 1
end
debug_removeBreakpoint(address_1)
debug_setBreakpoint(address_2)
function debugger_onBreakpoint()
adr2 = EAX
return 1
end
debug_removeBreakpoint(address_2)
print(adr1)
print(adr2)
|
But I managed to solve so if you know a better way tell me.
Code: |
function scanArray(findValue, protectionFlags)
if foundlist then foundlist.destroy() end
if memscan then memscan.destroy() end
memscan = createMemScan()
foundlist = createFoundList(memscan)
memscan.firstScan(soExactValue, vtByteArray, rtTruncated, findValue, nil,
"00000000", "7fffffff", protectionflags,
fsmAligned,"1",
true, false, false, false)
memscan.waitTillDone()
foundlist.initialize()
resultScan = foundlist.Address[0]
memscan.Destroy()
foundlist.Destroy()
return resultScan
end
address_1 = scanArray("F3 0F 7E 51 20 F2 0F 59 D0", "-W+X-C")
address_2 = scanArray("66 0F D6 47 20 8B 53 60", "-W+X-C")
function debugger_onBreakpoint()
adr1 = ECX
debug_removeBreakpoint(address_1)
function debugger_onBreakpoint()
adr2 = EAX
debug_removeBreakpoint(address_2)
return 1
end
debug_setBreakpoint(address_2)
return 1
end
debug_setBreakpoint(address_1)
print(adr1)
print(adr2) |
|
|
Back to top |
|
|
Zanzer I post too much Reputation: 126
Joined: 09 Jun 2013 Posts: 3278
|
Posted: Mon Oct 17, 2016 7:13 pm Post subject: |
|
|
debug_setBreakpoint() can accept a function parameter so that it executes a different function entirely just for that breakpoint.
Code: | debug_setBreakpoint(address_1, 1, bptExecute, function()
adr1 = ECX
debug_removeBreakpoint(address_1)
debug_continueFromBreakpoint(co_run)
return 1
end)
debug_setBreakpoint(address_2, 1, bptExecute, function()
adr2 = EAX
debug_removeBreakpoint(address_2)
debug_continueFromBreakpoint(co_run)
return 1
end) |
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|