Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Breakpoints with C++

Name: Anonymous 2007-07-08 19:18 ID:v9KXSASW

Hello 4chan, 7chan failed me in this..

I want to create my own debugger, like OllyDBG but as a injected DLL-file.
I have all functionality I want except for one; I don't know how to set/place breakpoints in the code..

My google-fu has failed me in this, if anyone could help me, please do! :)

Name: Anonymous 2007-07-08 19:39 ID:za+oo9tZ

Software breakpoints:
write an int 3 instruction (0xCC) at the desired location. The interrupt will (should) be trapped by your own debugger (EXCEPTION_DEBUG_EVENT). Be sure to check it was a breakpoint (EXCEPTION_BREAKPOINT) and it occured at the location you set it at.

Hardware breakpoints:
Use SetThreadContext and set the appropriate fields in the CONTEXT structure. You can do your own research here (I highly recommend the ``Intel 80386 Programmer's reference manual 1986''

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List