Of course this only works for x86 32 and 64 bit targets so you will need to 
#ifdef it out for other architectures. 

On Mar 15, 2014, at 3:21 PM, Richard Mitton <[email protected]> wrote:

>     __asm volatile ("int3");
> 
> Should work on any debugger, not just lldb.
> Also on Windows, you should generally use __debugbreak() instead of 
> DebugBreak, as the latter is a kernel-level call, whereas you generally want 
> a user-level breakpoint. The difference is that the user breakpoint gives a 
> nicer callstack.
> 
> Richard Mitton
> 
> [email protected]
> On 03/15/2014 05:59 AM, Deepankar Sharma wrote:
>> Is there a way that I can programmatically hit a breakpoint in my C++ code. 
>> I am looking for the lldb equivalent of the DebugBreak function on windows.
>> 
>> 
>> _______________________________________________
>> lldb-dev mailing list
>> 
>> [email protected]
>> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
> 
> _______________________________________________
> lldb-dev mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

_______________________________________________
lldb-dev mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev

Reply via email to