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_onBreakpoint questions
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions
View previous topic :: View next topic  
Author Message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Sun Dec 19, 2021 5:37 am    Post subject: Reply with quote

Then i'm not sure. print should have worked (outpit in lua engine window) unless you replaced print with an empty function

which CE version are you on?

_________________
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
GBRA4.669
How do I cheat?
Reputation: 0

Joined: 17 Dec 2021
Posts: 9

PostPosted: Sun Dec 19, 2021 5:55 am    Post subject: Reply with quote

V7.3
source code downloaded from SourceForge, compiled with Lazarus.
Then did some basic renaming of the HEX with HXD.

The print function is not overwritten. I am adding a print statement outside of the callback function and it works.

I am so sorry for all this spam, this situation is so unbelievable yet I am still experiencing it. My colleagues are making fun of me lol.
Maybe I will do a short video with the tutorial x64 as an example.


Thank you!
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 470

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

PostPosted: Sun Dec 19, 2021 6:22 am    Post subject: Reply with quote

execute
Code:

debugger_onBreakpoint()

and see if it prints anything

if it does, make sure you didn't use hxd to rename the debugger_ strings (it's referencing the "debugger_onBreakpoint" function by that string)

_________________
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
GBRA4.669
How do I cheat?
Reputation: 0

Joined: 17 Dec 2021
Posts: 9

PostPosted: Sun Dec 19, 2021 8:40 am    Post subject: Reply with quote

I guess the order of the functions execution is really important.
The flow has to be:
1. set a breakpoint
2. continue from the breakpoint in the next line (outside of the CB).

If I move "debug_continueFromBreakpoint(co_run)" in the callback function, the callback is never called. We must continue code execution to get the callback. Otherwise, we will be left stuck with a breakpoint set and no callback.

Code:

function debugger_onBreakpoint()
  print("inside a breakpoint " .. RBX); -- RBX will be printed in DEC, not HEX
  debug_removeBreakpoint(inject);
  print("breakpoint removed");
end

print("init");
openProcess("Tutorial-x86_64.exe");
local inject = getAddress("Tutorial-x86_64.exe+2B42C");
debugProcess(2);
debug_setBreakpoint(inject);
debug_continueFromBreakpoint(co_run); -- important or we will be left with the breakpoint set and game might be frozen


This will log:
Code:
"init"
"inside a breakpoint 21982864"
"breakpoint removed"


Thanks for all the help you legends.
Wish you all the best.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Discussions All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
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