Click here to Skip to main content
15,885,537 members
Articles / Desktop Programming / Win32

Toggle hardware data/read/execute breakpoints programmatically

Rate me:
Please Sign up or sign in to vote.
4.97/5 (41 votes)
23 Jul 2008CPOL2 min read 172.9K   4.7K   84  
Simple code to introduce a hardware breakpoint mechanism.
// 
#ifndef _HWBRK_H
#define _HWBRK_H

enum HWBRK_TYPE
	{
	HWBRK_TYPE_CODE,
	HWBRK_TYPE_READWRITE,
	HWBRK_TYPE_WRITE,
	};

enum HWBRK_SIZE
	{
	HWBRK_SIZE_1,
	HWBRK_SIZE_2,
	HWBRK_SIZE_4,
	HWBRK_SIZE_8,
	};

HANDLE SetHardwareBreakpoint(HANDLE hThread,HWBRK_TYPE Type,HWBRK_SIZE Size,void* s);
bool RemoveHardwareBreakpoint(HANDLE hBrk);
	

#endif

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Greece Greece
I'm working in C++, PHP , Java, Windows, iOS, Android and Web (HTML/Javascript/CSS).

I 've a PhD in Digital Signal Processing and Artificial Intelligence and I specialize in Pro Audio and AI applications.

My home page: https://www.turbo-play.com

Comments and Discussions