diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:26:05 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:26:05 +0000 | 
| commit | 14f1b3e8826ce43b978db93a62d1166055db5394 (patch) | |
| tree | 0a00ad8d3498783fe0193f3b656bca17c4c8697d /packages/Python/lldbsuite/test/lang/cpp/stl/TestStdCXXDisassembly.py | |
| parent | 4ee8c119c71a06dcad1e0fecc8c675e480e59337 (diff) | |
Notes
Diffstat (limited to 'packages/Python/lldbsuite/test/lang/cpp/stl/TestStdCXXDisassembly.py')
| -rw-r--r-- | packages/Python/lldbsuite/test/lang/cpp/stl/TestStdCXXDisassembly.py | 24 | 
1 files changed, 15 insertions, 9 deletions
| diff --git a/packages/Python/lldbsuite/test/lang/cpp/stl/TestStdCXXDisassembly.py b/packages/Python/lldbsuite/test/lang/cpp/stl/TestStdCXXDisassembly.py index 865516de4edc..47fdf59a27ee 100644 --- a/packages/Python/lldbsuite/test/lang/cpp/stl/TestStdCXXDisassembly.py +++ b/packages/Python/lldbsuite/test/lang/cpp/stl/TestStdCXXDisassembly.py @@ -5,13 +5,14 @@ Test the lldb disassemble command on lib stdc++.  from __future__ import print_function -  import unittest2 -import os, time +import os +import time  import lldb  from lldbsuite.test.lldbtest import *  import lldbsuite.test.lldbutil as lldbutil +  class StdCXXDisassembleTestCase(TestBase):      mydir = TestBase.compute_mydir(__file__) @@ -24,7 +25,9 @@ class StdCXXDisassembleTestCase(TestBase):      # rdar://problem/8504895      # Crash while doing 'disassemble -n "-[NSNumber descriptionWithLocale:]" -    @unittest2.skipIf(TestBase.skipLongRunningTest(), "Skip this long running test") +    @unittest2.skipIf( +        TestBase.skipLongRunningTest(), +        "Skip this long running test")      def test_stdcxx_disasm(self):          """Do 'disassemble' on each and every 'Code' symbol entry from the std c++ lib."""          self.build() @@ -36,7 +39,8 @@ class StdCXXDisassembleTestCase(TestBase):          # is this a problem with clang generated debug info?          #          # Break on line 13 of main.cpp. -        lldbutil.run_break_set_by_file_and_line (self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True) +        lldbutil.run_break_set_by_file_and_line( +            self, "main.cpp", self.line, num_expected_locations=1, loc_exact=True)          self.runCmd("run", RUN_SUCCEEDED) @@ -46,12 +50,13 @@ class StdCXXDisassembleTestCase(TestBase):          # The process should be in a 'stopped' state.          self.expect(str(process), STOPPED_DUE_TO_BREAKPOINT, exe=False, -            substrs = ["a.out", -                       "stopped"]) +                    substrs=["a.out", +                             "stopped"])          # Disassemble the functions on the call stack.          self.runCmd("thread backtrace") -        thread = lldbutil.get_stopped_thread(process, lldb.eStopReasonBreakpoint) +        thread = lldbutil.get_stopped_thread( +            process, lldb.eStopReasonBreakpoint)          self.assertIsNotNone(thread)          depth = thread.GetNumFrames()          for i in range(depth - 1): @@ -65,7 +70,8 @@ class StdCXXDisassembleTestCase(TestBase):          for i in range(target.GetNumModules()):              module = target.GetModuleAtIndex(i)              fs = module.GetFileSpec() -            if (fs.GetFilename().startswith("libstdc++") or fs.GetFilename().startswith("libc++")): +            if (fs.GetFilename().startswith("libstdc++") +                    or fs.GetFilename().startswith("libc++")):                  lib_stdcxx = str(fs)                  break @@ -73,7 +79,7 @@ class StdCXXDisassembleTestCase(TestBase):          # module is the corresponding SBModule.          self.expect(lib_stdcxx, "Libraray StdC++ is located", exe=False, -            substrs = ["lib"]) +                    substrs=["lib"])          self.runCmd("image dump symtab '%s'" % lib_stdcxx)          raw_output = self.res.GetOutput() | 
