[Lldb-commits] [lldb] r247000 - Bug 24733: TestRegisters.py for Clang inferiors

Abhishek Aggarwal via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 8 03:19:38 PDT 2015


Author: abhishek
Date: Tue Sep  8 05:19:37 2015
New Revision: 247000

URL: http://llvm.org/viewvc/llvm-project?rev=247000&view=rev
Log:
Bug 24733: TestRegisters.py for Clang inferiors
    
Summary:
  - Bug 24457 can now be tested for inferiors compiled
    by clang compiler also.
    
  - A generic test case for GCC and Clang inferiors:
    -- Works even when Clang and GCC produce different
       assembly for the same inferior.
  
  - Refer Differential Revision: http://reviews.llvm.org/D12677

Signed-off-by: Abhishek Aggarwal <abhishek.a.aggarwal at intel.com>

Modified:
    lldb/trunk/test/functionalities/register/TestRegisters.py
    lldb/trunk/test/functionalities/register/a.cpp

Modified: lldb/trunk/test/functionalities/register/TestRegisters.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/register/TestRegisters.py?rev=247000&r1=246999&r2=247000&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/register/TestRegisters.py (original)
+++ lldb/trunk/test/functionalities/register/TestRegisters.py Tue Sep  8 05:19:37 2015
@@ -37,7 +37,6 @@ class RegisterCommandsTestCase(TestBase)
         self.fp_register_write()
 
     @expectedFailureAndroid(archs=["i386"]) # "register read fstat" always return 0xffff
-    @expectedFailureClang("llvm.org/pr24733")
     def test_fp_special_purpose_register_read(self):
         """Test commands that read fpu special purpose registers."""
         if not self.getArchitecture() in ['amd64', 'i386', 'x86_64']:
@@ -169,15 +168,14 @@ class RegisterCommandsTestCase(TestBase)
         target = self.dbg.CreateTarget(exe)
         self.assertTrue(target, VALID_TARGET)
 
-        # Find the line number to break inside a.cpp.
-        self.line = line_number('a.cpp', '// Set break point at this line.')
-
-        # Set breakpoint
-        lldbutil.run_break_set_by_file_and_line (self, "a.cpp", self.line, num_expected_locations=1, loc_exact=True)
-
         # Launch the process, and do not stop at the entry point.
         self.runCmd ("run", RUN_SUCCEEDED)
 
+        # Check stop reason; Should be SIGTRAP
+        stop_reason = 'stop reason = signal SIGTRAP'
+        self.expect("thread list", STOPPED_DUE_TO_SIGNAL,
+                      substrs = ['stopped', stop_reason])
+
         process = target.GetProcess()
         self.assertTrue(process.GetState() == lldb.eStateStopped,
                         PROCESS_STOPPED)

Modified: lldb/trunk/test/functionalities/register/a.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/register/a.cpp?rev=247000&r1=246999&r2=247000&view=diff
==============================================================================
--- lldb/trunk/test/functionalities/register/a.cpp (original)
+++ lldb/trunk/test/functionalities/register/a.cpp Tue Sep  8 05:19:37 2015
@@ -13,6 +13,7 @@ return_long_double (long double value)
 {
     float a=2, b=4,c=8, d=16, e=32, f=64, k=128, l=256, add=0;
     __asm__ (
+        "int3 ;"
         "flds %1 ;"
         "flds %2 ;"
         "flds %3 ;"




More information about the lldb-commits mailing list