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 


break and trace

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine
View previous topic :: View next topic  
Author Message
InternalError
Newbie cheater
Reputation: 0

Joined: 23 Mar 2023
Posts: 12

PostPosted: Tue Mar 28, 2023 12:09 pm    Post subject: break and trace Reply with quote

Hello! I am stuck with this problem:
I wanna trace one kernel function.
Path passes through ExAcquireFastMutex. Tracing interrupted on ExAcquireFastMutex (cli-instruction. but after sti breackpointss dont work anyway).
For some reason the hardware breakpoint doesn't work after ExAcquireFastMutex (Im use DBVM-lvl debugger with hw-breackpoints).
But option "Break and trace instructions" works! (with DBVM-native break&trace) Shocked Why?
Ok, this suits me too. But I can trace only ~3000 instructions (Error: failure alloc *** pages of phys mem of DBVM). Me need, for example, 300000... And i cant start trace after and of previous trace. Others threads disturb it..



1111.png
 Description:
what am I doing wrong?
 Filesize:  9.23 KB
 Viewed:  1566 Time(s)

1111.png


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

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

PostPosted: Tue Mar 28, 2023 2:21 pm    Post subject: Reply with quote

I assume your break and trace also records stack snapshots?
so each entry basically takes 1.5 page

so for 300000 entries you'll need 1.5*300000 pages (at least) (450000 pages)

450000 pages is 450000*4096=1,843,200,000

So you'll need to sacrifice about 2GB of RAM to DBVM for 300000 entries
(Add those in smaller chunks, as adding the whole 2GB is one go might take longer than windows has patience for, and will bsod you)

Tip: Perhaps it's not needed to include a stack snapshot, in which case it'll take a lot less memory

_________________
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
InternalError
Newbie cheater
Reputation: 0

Joined: 23 Mar 2023
Posts: 12

PostPosted: Tue Mar 28, 2023 3:37 pm    Post subject: Reply with quote

I understood what the problem is. adding memory works strangely. I needed to connect the debugger, close CE and reconnect the debugger again for the memory addition to work (sometimes I have to do it several times).
Back to top
View user's profile Send private message
InternalError
Newbie cheater
Reputation: 0

Joined: 23 Mar 2023
Posts: 12

PostPosted: Fri Apr 07, 2023 9:11 pm    Post subject: Reply with quote

Dark Byte wrote:
I assume your break and trace also records stack snapshots?
so each entry basically takes 1.5 page

so for 300000 entries you'll need 1.5*300000 pages (at least) (450000 pages)

450000 pages is 450000*4096=1,843,200,000

So you'll need to sacrifice about 2GB of RAM to DBVM for 300000 entries
(Add those in smaller chunks, as adding the whole 2GB is one go might take longer than windows has patience for, and will bsod you)

Tip: Perhaps it's not needed to include a stack snapshot, in which case it'll take a lot less memory


you can at least give a short answer to the first question (why hardware breakpoints do not work, but tracing works after CLI)?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 468

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

PostPosted: Fri Apr 07, 2023 11:05 pm    Post subject: Reply with quote

interrupts are disabled at that point. So no context switching until interrupts are back on. And without context switching CE will never get to execute, so it will never be able to log the data and tell dbvm to continue, and certainly not show the state to the user

in short:windows would freeze

_________________
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
InternalError
Newbie cheater
Reputation: 0

Joined: 23 Mar 2023
Posts: 12

PostPosted: Fri Apr 07, 2023 11:29 pm    Post subject: Reply with quote

Dark Byte wrote:
interrupts are disabled at that point. So no context switching until interrupts are back on. And without context switching CE will never get to execute, so it will never be able to log the data and tell dbvm to continue, and certainly not show the state to the user

in short:windows would freeze

but "Break and trace" works!
is it a different mechanism? also breakpoints don't work after STI in this thread.



1111.png
 Description:
 Filesize:  20.01 KB
 Viewed:  1285 Time(s)

1111.png


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

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

PostPosted: Sat Apr 08, 2023 12:47 am    Post subject: Reply with quote

dbvm break and trace runs outside of windows with access to it's own memory manager. That's why it can continue to log

As for not breaking after sti can be other reasons like cr8 being not 0

_________________
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
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