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 


[Win32 C++] How to set a hardware breakpoint?
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Thu Jan 25, 2018 11:01 am    Post subject: Reply with quote

dr0 to dr3 contain addresses (or IO ports but let's not go into that for now...)

and dr7 is a bitfield split up into 4 sections (of 6 bits) and 8 bits for other features (global debug, break on TRAP, debug type handing, and old stuff used for before pentium cpus)

each debugreg section specifies if it's enabled or not, and if it should keep enabled when going through intel taskswitches or not.
And it contains the length of the breakpoint (1,2,4 or 8 bytes) and the type (execute, write, read/write, io port)

_________________
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
OldCheatEngineUser
Whateven rank
Reputation: 20

Joined: 01 Feb 2016
Posts: 1586

PostPosted: Thu Jan 25, 2018 11:18 am    Post subject: Reply with quote

thats interesting, i wanna read more about it.
which volume/chapter contain infos about this, im pointing to intel architecture software developers manual (ia-sdm)

also a question here about io-ports, did you meant hardware level? ie motherboard io?
if so then that means the user can also debug io's from HW-Ports?

_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote:
i am a sweetheart.
Back to top
View user's profile Send private message Visit poster's website
Dark Byte
Site Admin
Reputation: 457

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

PostPosted: Thu Jan 25, 2018 11:31 am    Post subject: Reply with quote

Intel® 64 and IA-32 Architectures Software Developer’s Manual chapter 17

As for io-ports, no idea, I never used them, but i'm sure that windows will prevent you from setting them in usermode (just like you can't set GD)
Talking about windows, it uses the obsolete GE/LE bits for access to the debugcontrol MSR to enable single stepping to branches only

_________________
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
OldCheatEngineUser
Whateven rank
Reputation: 20

Joined: 01 Feb 2016
Posts: 1586

PostPosted: Thu Jan 25, 2018 11:47 am    Post subject: Reply with quote

tons of thanks db.
_________________
About Me;
I Use CE Since Version 1.X, And Still Learning How To Use It Well!
Jul 26, 2020
STN wrote:
i am a sweetheart.
Back to top
View user's profile Send private message Visit poster's website
toffler
Cheater
Reputation: 0

Joined: 27 Sep 2012
Posts: 38

PostPosted: Fri Jan 26, 2018 4:54 am    Post subject: Reply with quote

I finally made HWBP work, thanks Dark Byte!

To my surprise, it turned out HWBP take a lot heavier toll on the debugee than SWBP, the cost of broadcasting debug register states to all threads outweighs the punishment for flushing CPU cache in case of SWBPs, at least when you have a couple dozen threads.
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 programming 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