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 


Help with Dr7 -> Hardware Breakpoints

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
iPromise
Grandmaster Cheater
Reputation: -1

Joined: 27 Jun 2009
Posts: 529
Location: Canada

PostPosted: Fri Jun 15, 2012 2:18 pm    Post subject: Help with Dr7 -> Hardware Breakpoints Reply with quote

I am setting the Dr7 register to the following:

Code:

// Set the conditions
         if ( !type ) {
            c.Dr7 = 0xFFFF03FF; //0x7FFF8055;
         }
         else
            // Break on write, length 4 bytes
            c.Dr7 = 0xDDDD20FF;


The addresses that I get do not compare to cheat engine's addresses. When the variable type (mentioned above) is 1, it's sopposed to activate the exception handler on all writes but when I compare my results to CE's, its different. I suspect that its something that is wrong with the values of the Dr7 register.
Back to top
View user's profile Send private message MSN Messenger
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Fri Jun 15, 2012 2:45 pm    Post subject: Reply with quote

for type=0:
You enable the read/write breakpoint for bp 0, 1, 2 and 3 with a length of 4 bytes
You also set the GE/GL bits, which is used in windows 7 as a break on jump only

for type!=0:
You enable the write only breakpoint for bp 0, 1, 2 and 3 with a length of 4 bytes
This time you don't set the GE/GL bits, but you actually set the GD bit (luckily windows prevents you from doing that, you'd crash)


I recommend only setting the breakpoint you actually wish activated

And keep in mind, the state of the registers are those of AFTER the instruction has been handled. Do not handle this breakpoint like you do an execute breakpoint

_________________
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
iPromise
Grandmaster Cheater
Reputation: -1

Joined: 27 Jun 2009
Posts: 529
Location: Canada

PostPosted: Fri Jun 15, 2012 3:24 pm    Post subject: Reply with quote

I'm getting the same results.

In bits:

11111111010000001111111111111111

In hexadecimal:

FF40FFFF

This is for type == 0 (access).

GE/GL -> You mean GE right? the GL bit doesn't exist in the intel documentation
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 -> General programming 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