[Lldb-commits] [PATCH] D12677: Bug 24733: TestRegisters.py for Clang inferiors

Abhishek via lldb-commits lldb-commits at lists.llvm.org
Mon Sep 7 08:25:37 PDT 2015


abhishek.aggarwal added inline comments.

================
Comment at: test/functionalities/register/TestRegisters.py:195
@@ +194,3 @@
+            for x in range(0,16):
+                self.runCmd ("si", RUN_SUCCEEDED)
+
----------------
labath wrote:
> First I would like to applaud for writing a test case for such a delicate issue. I know it's not easy given the current test infrastructure.
> 
> However, this change seems very fragile and likely to break due to random changes in clang implementation and/or command line flags. Even the gcc path can break if the gcc happens to produce slightly different output. I would like to avoid relying on hardcoded instruction counts.
> 
> How about we try something like this:
> - in the inline assembly, we prepend the code you want to test with "int3"
> - run the inferior normally. it should hit the debugger trap and stop (you can verify that the stop reason is indeed sigtrap)
> - the next instruction should point precisely at the code you want to test, without relying on any debug info or instruction counts
> - proceed with the test normally
> 
> what do you think?
Thanks for suggesting a nice way to fix it. I agree with you. I will make the changes.


http://reviews.llvm.org/D12677





More information about the lldb-commits mailing list