x86 inline assembler to stop in debugger
x86 inline assembler to stop in debugger
- Subject: x86 inline assembler to stop in debugger
- From: Dave McCaldon <email@hidden>
- Date: Sun, 29 Jan 2006 13:19:07 -0500
Technical Q&A QA1361 shows how to detect if you are running under the debugger, somewhere I found a snippet of inline assembler that uses this to trap into the debugger (useful for ASSERTs etc).
#define DebugBreak() __asm__ volatile ("twnei %0,0" : : "r" (AmIBeingDebugged()))
Can anyone confirm what the x86 version of this is? I'm guessing something along the lines of:
#define DebugBreak() if (AmIBeingDebugged()) { __asm__ volatile ("int 3"); }
Thanks.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden