On Thu, 25 Jul 2002, Max wrote: > Maybe it's a stupid question, but... is there a way to hard-code a > breakpoint ? I need to check a bit of code that gets called too many times and > I'd like to put a conditional breakpoints compiled in code; no way to use > winedbg built-in conditional breaks, the condition is too complicated.....
You can do: if (complex condition) { _CrtDbgBreak(); } Or equivalently: if (complex condition) { __asm__ ("\tint $0x3\n"); } The int 3 is a software breakpoint (or rather, a software breakpoint is an int 3). The bove code will cause you to drop in the debugger if the int 3 ever gets executed. This only works on x86 architectures but this is probably all you need. -- Francois Gouget [EMAIL PROTECTED] http://fgouget.free.fr/ Advice is what we ask for when we already know the answer but wish we didn't -- Eric Jong