[Lldb-commits] [lldb] r132951 - in /lldb/trunk/test: class_types/TestClassTypes.py hello_world/TestHelloWorld.py lldbtest.py
Johnny Chen
johnny.chen at apple.com
Mon Jun 13 16:19:35 PDT 2011
Author: johnny
Date: Mon Jun 13 18:19:35 2011
New Revision: 132951
URL: http://llvm.org/viewvc/llvm-project?rev=132951&view=rev
Log:
Removed unneeded method breakAfterLaunch() from the TestBase class to simplify our base class.
It was introduced to work around some debugger infrastructure bug which has long since been fixed.
Modified:
lldb/trunk/test/class_types/TestClassTypes.py
lldb/trunk/test/hello_world/TestHelloWorld.py
lldb/trunk/test/lldbtest.py
Modified: lldb/trunk/test/class_types/TestClassTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/class_types/TestClassTypes.py?rev=132951&r1=132950&r2=132951&view=diff
==============================================================================
--- lldb/trunk/test/class_types/TestClassTypes.py (original)
+++ lldb/trunk/test/class_types/TestClassTypes.py Mon Jun 13 18:19:35 2011
@@ -121,7 +121,6 @@
# Now launch the process, and do not stop at entry point.
error = lldb.SBError()
self.process = target.Launch (self.dbg.GetListener(), None, None, os.ctermid(), os.ctermid(), os.ctermid(), None, 0, False, error)
- #self.breakAfterLaunch(self.process, "C::C(int, int, int)")
if not error.Success() or not self.process:
self.fail("SBTarget.Launch() failed")
Modified: lldb/trunk/test/hello_world/TestHelloWorld.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/hello_world/TestHelloWorld.py?rev=132951&r1=132950&r2=132951&view=diff
==============================================================================
--- lldb/trunk/test/hello_world/TestHelloWorld.py (original)
+++ lldb/trunk/test/hello_world/TestHelloWorld.py Mon Jun 13 18:19:35 2011
@@ -62,10 +62,6 @@
# On the other hand, the following line of code are more reliable.
self.runCmd("run", setCookie=False)
- #self.runCmd("thread backtrace")
- #self.runCmd("breakpoint list")
- #self.runCmd("thread list")
-
self.process = target.GetProcess()
self.assertTrue(self.process, PROCESS_IS_VALID)
Modified: lldb/trunk/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=132951&r1=132950&r2=132951&view=diff
==============================================================================
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Mon Jun 13 18:19:35 2011
@@ -879,46 +879,6 @@
print >> sbuf, str(method) + ":", result
return result
- def breakAfterLaunch(self, process, func, trace=False):
- """
- Perform some dances after Launch() to break at func name.
-
- Return True if we can successfully break at the func name in due time.
- """
- trace = (True if traceAlways else trace)
-
- count = 0
- while True:
- # The stop reason of the thread should be breakpoint.
- thread = process.GetThreadAtIndex(0)
- SR = thread.GetStopReason()
- with recording(self, trace) as sbuf:
- print >> sbuf, "StopReason =", stop_reason_to_str(SR)
-
- if SR == lldb.eStopReasonBreakpoint:
- frame = thread.GetFrameAtIndex(0)
- name = frame.GetFunction().GetName()
- with recording(self, trace) as sbuf:
- print >> sbuf, "function =", name
- if (name == func):
- # We got what we want; now break out of the loop.
- return True
-
- # The inferior is in a transient state; continue the process.
- time.sleep(1.0)
- with recording(self, trace) as sbuf:
- print >> sbuf, "Continuing the process:", process
- process.Continue()
-
- count = count + 1
- if count == 15:
- with recording(self, trace) as sbuf:
- print >> sbuf, "Reached 15 iterations, giving up..."
- # Enough iterations already, break out of the loop.
- return False
-
- # End of while loop.
-
# ====================================================
# Config. methods supported through a plugin interface
# (enables reading of the current test configuration)
More information about the lldb-commits
mailing list