Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Debugger's accesses this and writes to

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting
View previous topic :: View next topic  
Author Message
XDavidXtreme
How do I cheat?
Reputation: 0

Joined: 22 Apr 2019
Posts: 2

PostPosted: Tue Jul 27, 2021 8:09 am    Post subject: Debugger's accesses this and writes to Reply with quote

Does Cheat Engine's Lua have any function that could create a similar result to Debugger's "Accesses this" and "Writes to" without the need to attach the debugger every time it is called?

Mainly I only want to know at what address is the selected address written, or at what address it is accessed.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Tue Jul 27, 2021 9:09 am    Post subject: Reply with quote

The debugger is only needed to attach once.
You can use
Code:

debug_setBreakpoint(address, 4, bptAccess, function()
  printf("RIP=%x",RIP)
  return nil
end)


and then instead of print just log it into a local table or something

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
XDavidXtreme
How do I cheat?
Reputation: 0

Joined: 22 Apr 2019
Posts: 2

PostPosted: Wed Jul 28, 2021 1:44 pm    Post subject: Reply with quote

Dark Byte wrote:
The debugger is only needed to attach once.
You can use
Code:

debug_setBreakpoint(address, 4, bptAccess, function()
  printf("RIP=%x",RIP)
  return nil
end)


and then instead of print just log it into a local table or something


Thank you, I managed to implement it, but something is a little bit off, my debugger shows the address off by like 0x3, though sometimes it is also by 0x4 and 0x6, is this a bug or had I done something wrong?

They are both on the same address and the address didn't change when I switched from Cheat Engine's debugger to mine.



Screenshot_2.png
 Description:
 Filesize:  3.67 KB
 Viewed:  878 Time(s)

Screenshot_2.png



Screenshot_1.png
 Description:
 Filesize:  3.13 KB
 Viewed:  878 Time(s)

Screenshot_1.png


Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 138

Joined: 06 Jul 2014
Posts: 4275

PostPosted: Wed Jul 28, 2021 1:48 pm    Post subject: Reply with quote

Data breakpoints (access / write) trigger after the instruction executed. You have to guess the previous instruction that actually accessed the data.
_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Lua Scripting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites