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 


set data access breakpoint on the address esp+04 immediate

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
skynet888
!BEWARE! Deletes post on answer
Reputation: 1

Joined: 12 Apr 2021
Posts: 105

PostPosted: Thu Dec 03, 2026 6:05 am    Post subject: set data access breakpoint on the address esp+04 immediate Reply with quote

As shown in the screenshot: I want to set a data access breakpoint on the address esp+04 immediately after the instruction mov [esp+04],eax executes. I wrote a Lua script for this, but it has a bug. It causes the Lua output window to spam nonstop, and may crash the target process or Cheat Engine.

Code:
local nextAddr = 0x6933BACB

local function onAccess()
    print(string.format("onAccess:EIP=%X,Addr=%X", EIP, ESP + 4))
    debug_removeBreakpoint(ESP + 4, 4)
    debug_continueFromBreakpoint(co_run)
end

local function onNext()
    debug_removeBreakpoint(nextAddr, 1)
    debug_setBreakpoint(ESP + 4, 4, bptAccess, bpmDebugRegister, onAccess)
    debug_continueFromBreakpoint(co_run)
end

debug_setBreakpoint(nextAddr, 1, bptExecute, bpmDebugRegister, onNext)


[/quote][/code]



111111111111111111111111111111111111111111.png
 Description:
 Filesize:  4.98 KB
 Viewed:  75 Time(s)

111111111111111111111111111111111111111111.png


Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 475

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

PostPosted: Thu Dec 03, 2026 8:10 am    Post subject: Reply with quote

never call debug_continueFromBreakpoint from inside breakpoint handlers
_________________
Tools give you results. Knowledge gives you control.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine 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