[llvm-commits] [llvm] r156593 - in /llvm/trunk: docs/LangRef.html include/llvm/CodeGen/ISDOpcodes.h include/llvm/Intrinsics.td include/llvm/Target/TargetSelectionDAG.td lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp lib/CodeGen/SelectionDAG/Sel

Sandeep Patel deeppatel1987 at gmail.com
Mon May 14 13:33:42 PDT 2012


A common spelling for the int3 intrinsic is void __debugbreak(void).

deep

On Mon, May 14, 2012 at 6:42 PM, Dan Gohman <gohman at apple.com> wrote:
>
> On May 11, 2012, at 12:12 PM, Nick Lewycky <nicholas at mxc.ca> wrote:
>
>> Dan Gohman wrote:
>>>
>>> On May 10, 2012, at 10:26 PM, Nick Lewycky wrote:
>>>
>>>> Dan Gohman wrote:
>>>>> Modified: llvm/trunk/docs/LangRef.html
>>>>> +<h5>Semantics:</h5>
>>>>> +<p>This intrinsic is lowered to code which is intended to cause an
>>>>> execution
>>>>> + trap with the intention of requesting the attention of a debugger.</p>
>>>>
>>>> ... but no other effect? Is that how it's different from @llvm.trap,
>>>> that if there is no debugger, the program continue running normally?
>>>
>>> The main difference is that on x86 it generates int3, rather than ud2.
>>> Perhaps I
>>> tried to hard to make the language generic.
>>
>> Right, but I don't know what that does either. I know that ud2 is going to stop your program (signal handlers notwithstanding), but what does int 3 do? Call into the debugger if there is a debugger, otherwise the program trundles along? Or does it do the exact same thing as ud2? (In which case, what's the point of this new intrinsic?)
>
>
> In short, ud2 gets SIGILL, which connotes that something is
> buggy, while int3 gets SIGTRAP, which merely connotes that
> something requested a trap.
>
> Dan
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list