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.
64 位版本的 Visual c + + 編譯器不支持內聯匯編,所以你不能寫 __asm int 3 這樣的代碼。但是還有一個,不太為常人所知的機制在調試期間創建中斷 — — __debugbreak() 。這是定義在 vc/include/intrin.h 中的 VisualC + + 編譯器內部函數,它具有 int 3 相同的功能。不像 int 3 ,此功能是跨平臺的。Win32 函數 DebugBreak() 有一個類似的功能。
新聞熱點
疑難解答