[Lldb-commits] [lldb] r129785 - in /lldb/trunk/test: inferior-crashing/TestInferiorCrashing.py lldbtest.py
Johnny Chen
johnny.chen at apple.com
Tue Apr 19 12:04:38 PDT 2011
Author: johnny
Date: Tue Apr 19 14:04:38 2011
New Revision: 129785
URL: http://llvm.org/viewvc/llvm-project?rev=129785&view=rev
Log:
Add a TraceOn(self) method to the base test class, which returns True if we are
currently in trace mode (-t to dotest.py), i.e., tracing the lldb command execution.
Change TestInferiorCrashing.inferior_crashing_python(self) to check this flag in
order to print the stack trace of the inferior thread.
Modified:
lldb/trunk/test/inferior-crashing/TestInferiorCrashing.py
lldb/trunk/test/lldbtest.py
Modified: lldb/trunk/test/inferior-crashing/TestInferiorCrashing.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/inferior-crashing/TestInferiorCrashing.py?rev=129785&r1=129784&r2=129785&view=diff
==============================================================================
--- lldb/trunk/test/inferior-crashing/TestInferiorCrashing.py (original)
+++ lldb/trunk/test/inferior-crashing/TestInferiorCrashing.py Tue Apr 19 14:04:38 2011
@@ -70,7 +70,8 @@
if not thread:
self.fail("Fail to stop the thread upon bad access exception")
- lldbutil.PrintStackTrace(thread)
+ if self.TraceOn():
+ lldbutil.PrintStackTrace(thread)
if __name__ == '__main__':
import atexit
Modified: lldb/trunk/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=129785&r1=129784&r2=129785&view=diff
==============================================================================
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Tue Apr 19 14:04:38 2011
@@ -951,3 +951,7 @@
return
print child
+
+ def TraceOn(self):
+ """Returns True if we are in trace mode (i.e., verbose output)."""
+ return traceAlways
More information about the lldb-commits
mailing list