вторник, 19 июля 2011 г.

What can I use instead of "int 3" instruction in a 64-bit application?

The 64-bit version of Visual C++ compiler does not support inline assembler, so you cannot write code like "__asm int 3". But there is one more, less known mechanism to create interrupts during debugging – __debugbreak(). This is an intrinsic function of the VisualC++ compiler defined in vc\include\intrin.h which actually has the same functionality as int 3. Unlike int 3, this function is cross-platform. The Win32 function DebugBreak() has a similar functionality.

References

  1. Discussion at www.stackoverflow.com. Where did int 3 go?
  2. MSDN Library. DebugBreak Function
  3. MSDN Library. __debugbreak

Комментариев нет:

Отправить комментарий