x64 Debugger, ExceptionCode == 0x4000001f

I should be finishing some docs for the x64 release of The Server Framework… But this is more interesting…

When running my Win32 debugging code on x64, this time when compiled natively as x64 code and when debugging an x64 CLR process, I’ve been getting an ‘unexpected’ ExceptionCode in an EXCEPTION_DEBUG_EVENT. The code is 0x4000001f and, after some searching around, it seems that it’s a STATUS_WX86_BREAKPOINT event and I sometimes get these instead of EXCEPTION_BREAKPOINT events…

This is a bit of a surprise, some breakpoints that I’ve set generate the expected debug event and some generate the 0x4000001f one… This isn’t too bad to handle in code except for the fact that I’m getting one of these debug events generated for a break point that I havent set and know nothing about…