krytarowski added inline comments.

================
Comment at: unittests/tools/lldb-server/inferior/thread_inferior.cpp:21
+
+  LLVM_BUILTIN_DEBUGTRAP;
+  delay = false;
----------------
jmajors wrote:
> krytarowski wrote:
> > jmajors wrote:
> > > zturner wrote:
> > > > This will work on MSVC and presumably clang.  I'm not sure about gcc.  
> > > > Is that sufficient for your needs?   Do you know if gcc has the 
> > > > `__builtin_debugtrap` intrinsic?
> > > Do we use gcc to build/test lldb? If not, then it shouldn't be an issue. 
> > > If we ever change our compiler of choice, we can always change this to 
> > > match.
> > Yes, we use and support GCC with libstdc++ to build LLDB including tests. 
> > At least on NetBSD.
> Is there a gcc equivalent, that I could wrap in some #ifdefs?
No, there is no equivalent and I'm trying to convince that we should not try to 
use this `__builtin_debugtrap()` in the code. We should ask the debugger to set 
and handle the trap.

Otherwise we will need to handle this on per-cpu and per-os matrix. In the 
SPARC/NetBSD example we would need to ask the debugger to set PC after the trap 
manually.


https://reviews.llvm.org/D32930



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to