Posted: Fri Sep 03, 2021 9:39 am Post subject: Watches
In my previous forum post 'Code overloads game crashing it' (I'm not allowed to send links yet) Dark Byte told me about 'watches'. I've been searching for ages and can't find anything about it. Would anyone mind explaining it?
I'd also like to know about the Lua part of the post. _________________
A watch is a specific type of breakpoint. I believe they are a hardware breakpoint and there is a limit of 4 for hardware breakpoints. Software breakpoints can have as many as you like.
As for the code, a response that no one really likes, but you should read up a bit about Lua as it will help you understand more. There are ample resources for Lua programmaing; however, I will explain here.
Code:
-- loop from 1 to number of entries in the addresses list
for listCount = 1, #addresses do
-- create a timer with a delay of 1+300 * (i-1) in milliseconds and assign the function finadAddress to the created timer
createTimer(1+300*(i-1), function(t)
findAddress(getAddress(base)+addresses[listCount], listCount)
end
end
Normally, breakpoints are used to stop execution at a particular instruction. Watches are a type of breakpoint that stop when a value in memory is written to or accessed. They typically rely on hardware to do this:
https://en.wikipedia.org/wiki/X86_debug_register
You can implement it in software too by marking a memory page as read-only or no access. This will cause a page fault that the OS alerts the debugger about when a value in that page is written to or accessed respectively. However, this affects every value in that page and therefore could slow down the target considerably. _________________
I don't know where I'm going, but I'll figure it out when I get there.
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