[Lldb-commits] [PATCH] D15834: Handle hardcoded breakpoints on Windows (e.g., int3 or __debugbreak())

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 8 05:00:21 PST 2016


labath accepted this revision.
labath added a reviewer: labath.
labath added a comment.

`__builtin_debugtrap()` indeed works (thanks Jim), but only on clang (no gcc). Since that is architecture-independent, I think we should use that and just make the test @skipIfGcc. Apart from that, the test works fine on linux after fixing the macro issue.


================
Comment at: packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/Makefile:5
@@ +4,3 @@
+
+ifneq (,$(findstring icc,$(CC)))
+    CFLAGS += -debug inline-debug-info
----------------
Is anyone actually using icc? I think we should just remove that...

================
Comment at: packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/TestDebugBreak.py:17
@@ +16,3 @@
+    @skipIf(archs=not_in(["i386", "i686"]))
+    @expectedFailureAll("llvm.org/pr15936", compiler="gcc", compiler_version=["<=","4.6"])
+    @expectedFailureAll(archs="arm", compiler="gcc", triple=".*-android") # gcc generates incorrect linetable
----------------
I don't think these two XFAILs will be necessary now. Let's assume this will work until proven otherwise.

================
Comment at: packages/Python/lldbsuite/test/functionalities/breakpoint/debugbreak/main.c:5
@@ +4,3 @@
+#else
+#define BREAKPOINT_INTRINSIC    __asm__ __volatile__ ("int3");
+#endif
----------------
this will generate the wrong expansion (leaves `()` hanging). I recommend using the following:
`#define BREAKPOINT_INTRINSIC() ...`
to make sure the parens are consumed.


http://reviews.llvm.org/D15834





More information about the lldb-commits mailing list