diff --git a/reactos/include/debug.h b/reactos/include/debug.h index 38c9223a5c9..73b3e5264e7 100644 --- a/reactos/include/debug.h +++ b/reactos/include/debug.h @@ -34,26 +34,12 @@ #define DPRINT1(args...) do { DbgPrint("(%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0); #define CHECKPOINT1 do { DbgPrint("%s:%d\n",__FILE__,__LINE__); } while(0); -extern unsigned int old_idt[256][2]; -//extern unsigned int idt; -extern unsigned int old_idt_valid; - -#ifdef __NTOSKRNL__ -//#define DPRINT_CHECKS ExAllocatePool(NonPagedPool,0); assert(old_idt_valid || (!memcmp(old_idt,KiIdt,256*2))); -//#define DPRINT_CHECKS ExAllocatePool(NonPagedPool,0); -#define DPRINT_CHECKS -#else -#define DPRINT_CHECKS -#endif #ifndef NDEBUG -#define OLD_DPRINT(fmt,args...) do { DbgPrint("(%s:%d) ",__FILE__,__LINE__); DbgPrint(fmt,args); } while(0); -#define DPRINT(args...) do { DbgPrint("(%s:%d) ",__FILE__,__LINE__); DbgPrint(args); DPRINT_CHECKS } while(0); +#define DPRINT(args...) do { DbgPrint("(%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0); #define CHECKPOINT do { DbgPrint("%s:%d\n",__FILE__,__LINE__); } while(0); #else -//#define DPRINT(args...) do { DPRINT_CHECKS } while (0); #define DPRINT(args...) -#define OLD_DPRINT(args...) #define CHECKPOINT #endif /* NDEBUG */ @@ -65,36 +51,5 @@ extern unsigned int old_idt_valid; #define ASSERT_IRQL(x) assert(KeGetCurrentIrql()<=(x)) #define assert_irql(x) assert(KeGetCurrentIrql()<=(x)) -#define HBP_EXECUTE (0) -#define HBP_WRITE (1) -#define HBP_READWRITE (3) - -#define HBP_BYTE (0) -#define HBP_WORD (1) -#define HBP_DWORD (3) - -/* - * FUNCTION: Sets a hardware breakpoint - * ARGUMENTS: - * i = breakpoint to set (0 to 3) - * addr = linear address to break on - * type = Type of access to break on - * len = length of the variable to watch - * NOTES: - * The variable to watch must be aligned to its length (i.e. a dword - * breakpoint must be aligned to a dword boundary) - * - * A fatal exception will be generated on the access to the variable. - * It is (at the moment) only really useful for catching undefined - * pointers if you know the variable effected but not the buggy - * routine. - * - * FIXME: Extend to call out to kernel debugger on breakpoint - * Add support for I/O breakpoints - * REFERENCES: See the i386 programmer manual for more details - */ -void set_breakpoint(unsigned int i, unsigned int addr, unsigned int type, - unsigned int len); - #endif /* __INTERNAL_DEBUG */ diff --git a/reactos/include/win32k/debug1.h b/reactos/include/win32k/debug1.h index 7618cb86c65..c1a75a6bea2 100644 --- a/reactos/include/win32k/debug1.h +++ b/reactos/include/win32k/debug1.h @@ -34,26 +34,18 @@ #define DPRINT1(args...) do { DbgPrint("(%s:%d) ",__FILE__,__LINE__); DbgPrint(args); ExAllocatePool(NonPagedPool,0); } while(0); #define CHECKPOINT1 do { DbgPrint("%s:%d\n",__FILE__,__LINE__); ExAllocatePool(NonPagedPool,0); } while(0); -extern unsigned int old_idt[256][2]; -//extern unsigned int idt; -extern unsigned int old_idt_valid; #ifdef __NTOSKRNL__ -//#define DPRINT_CHECKS ExAllocatePool(NonPagedPool,0); assert(old_idt_valid || (!memcmp(old_idt,KiIdt,256*2))); -//#define DPRINT_CHECKS ExAllocatePool(NonPagedPool,0); #define DPRINT_CHECKS #else #define DPRINT_CHECKS #endif #ifndef NDEBUG -#define OLD_DPRINT(fmt,args...) do { DbgPrint("(%s:%d) ",__FILE__,__LINE__); DbgPrint(fmt,args); } while(0); -#define DPRINT(args...) do { DbgPrint("(%s:%d) ",__FILE__,__LINE__); DbgPrint(args); DPRINT_CHECKS } while(0); +#define DPRINT(args...) do { DbgPrint("(%s:%d) ",__FILE__,__LINE__); DbgPrint(args); } while(0); #define CHECKPOINT do { DbgPrint("%s:%d\n",__FILE__,__LINE__); ExAllocatePool(NonPagedPool,0); } while(0); #else -//#define DPRINT(args...) do { DPRINT_CHECKS } while (0); #define DPRINT(args...) -#define OLD_DPRINT(args...) #define CHECKPOINT #endif /* NDEBUG */ @@ -65,36 +57,4 @@ extern unsigned int old_idt_valid; #define ASSERT_IRQL(x) assert(KeGetCurrentIrql()<=(x)) #define assert_irql(x) assert(KeGetCurrentIrql()<=(x)) -#define HBP_EXECUTE (0) -#define HBP_WRITE (1) -#define HBP_READWRITE (3) - -#define HBP_BYTE (0) -#define HBP_WORD (1) -#define HBP_DWORD (3) - -/* - * FUNCTION: Sets a hardware breakpoint - * ARGUMENTS: - * i = breakpoint to set (0 to 3) - * addr = linear address to break on - * type = Type of access to break on - * len = length of the variable to watch - * NOTES: - * The variable to watch must be aligned to its length (i.e. a dword - * breakpoint must be aligned to a dword boundary) - * - * A fatal exception will be generated on the access to the variable. - * It is (at the moment) only really useful for catching undefined - * pointers if you know the variable effected but not the buggy - * routine. - * - * FIXME: Extend to call out to kernel debugger on breakpoint - * Add support for I/O breakpoints - * REFERENCES: See the i386 programmer manual for more details - */ -void set_breakpoint(unsigned int i, unsigned int addr, unsigned int type, - unsigned int len); - - #endif /* __INTERNAL_DEBUG */