X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=blobdiff_plain;f=src%2Futil.h;h=76dd044eae32bfe11d9419d1a3cb25e42adf1530;hp=6d200b7824f14dbcff470db501150d193d6b7920;hb=8cee0ffb00cce3d81487f1161286ac299db7d044;hpb=9ed338a5e703fc819cede5cb797e82e08046ac17 diff --git a/src/util.h b/src/util.h index 6d200b7..76dd044 100644 --- a/src/util.h +++ b/src/util.h @@ -43,6 +43,9 @@ void perf_end(void); "sub eax, [perf_start_count]" \ "mov [perf_interval_count], eax" \ modify [eax ebx ecx edx]; + +void debug_break(void); +#pragma aux debug_break = "int 3"; #endif #ifdef __GNUC__ @@ -63,6 +66,9 @@ void perf_end(void); : "=m"(perf_interval_count) \ : "m"(perf_start_count) \ : "%eax", "%ebx", "%ecx", "%edx") + +#define debug_break() \ + asm volatile ("int $3") #endif #ifdef _MSC_VER @@ -86,6 +92,11 @@ void perf_end(void); mov [perf_interval_count], eax \ } \ } while(0) + +#define debug_break() \ + do { \ + __asm { int 3 } \ + } while(0) #endif #endif /* UTIL_H_ */