[Lldb-commits] [lldb] r112880 - in /lldb/trunk/test: dead-strip/TestDeadStrip.py function_types/TestFunctionTypes.py lldbtest.py
Johnny Chen
johnny.chen at apple.com
Thu Sep 2 15:25:47 PDT 2010
Author: johnny
Date: Thu Sep 2 17:25:47 2010
New Revision: 112880
URL: http://llvm.org/viewvc/llvm-project?rev=112880&view=rev
Log:
Added comments regarding the two mechanisms of process cleanup to lldbtest.py.
Also changed the expected strings to be matched since "thread list" changed its
output format.
Modified:
lldb/trunk/test/dead-strip/TestDeadStrip.py
lldb/trunk/test/function_types/TestFunctionTypes.py
lldb/trunk/test/lldbtest.py
Modified: lldb/trunk/test/dead-strip/TestDeadStrip.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/dead-strip/TestDeadStrip.py?rev=112880&r1=112879&r2=112880&view=diff
==============================================================================
--- lldb/trunk/test/dead-strip/TestDeadStrip.py (original)
+++ lldb/trunk/test/dead-strip/TestDeadStrip.py Thu Sep 2 17:25:47 2010
@@ -45,7 +45,7 @@
self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
substrs = ['state is Stopped',
'main.c:20',
- 'where = a.out`f1',
+ 'a.out`f1',
'stop reason = breakpoint'])
# The breakpoint should have a hit count of 1.
@@ -58,7 +58,7 @@
self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
substrs = ['state is Stopped',
'main.c:40',
- 'where = a.out`f3',
+ 'a.out`f3',
'stop reason = breakpoint'])
# The breakpoint should have a hit count of 1.
Modified: lldb/trunk/test/function_types/TestFunctionTypes.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/function_types/TestFunctionTypes.py?rev=112880&r1=112879&r2=112880&view=diff
==============================================================================
--- lldb/trunk/test/function_types/TestFunctionTypes.py (original)
+++ lldb/trunk/test/function_types/TestFunctionTypes.py Thu Sep 2 17:25:47 2010
@@ -39,7 +39,7 @@
# Check that we do indeed stop on the string_not_empty function.
self.expect("process status", STOPPED_DUE_TO_BREAKPOINT,
- substrs = ['where = a.out`string_not_empty',
+ substrs = ['a.out`string_not_empty',
'main.c:12',
'stop reason = breakpoint'])
Modified: lldb/trunk/test/lldbtest.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lldbtest.py?rev=112880&r1=112879&r2=112880&view=diff
==============================================================================
--- lldb/trunk/test/lldbtest.py (original)
+++ lldb/trunk/test/lldbtest.py Thu Sep 2 17:25:47 2010
@@ -25,9 +25,8 @@
OK
$ LLDB_COMMAND_TRACE=YES python array_types/TestArrayTypes.py
-LLDB_COMMAND_TRACE=YES python array_types/TestArrayTypes.py
-runCmd: file /Volumes/data/lldb/svn/trunk/test/array_types/a.out
-output: Current executable set to '/Volumes/data/lldb/svn/trunk/test/array_types/a.out' (x86_64).
+
+...
runCmd: breakpoint set -f main.c -l 42
output: Breakpoint created: 1: file ='main.c', line = 42, locations = 1
@@ -35,17 +34,9 @@
runCmd: run
output: Launching '/Volumes/data/lldb/svn/trunk/test/array_types/a.out' (x86_64)
-runCmd: thread list
-output: Process 24987 state is Stopped
- thread #1: tid = 0x2e03, pc = 0x0000000100000df4, where = a.out`main + 612 at /Volumes/data/lldb/svn/trunk/test/array_types/main.c:45, stop reason = breakpoint 1.1, queue = com.apple.main-thread
-
-runCmd: breakpoint list
-output: Current breakpoints:
-1: file ='main.c', line = 42, locations = 1, resolved = 1
- 1.1: where = a.out`main + 612 at /Volumes/data/lldb/svn/trunk/test/array_types/main.c:45, address = 0x0000000100000df4, resolved, hit count = 1
-
+...
-runCmd: variable list strings
+runCmd: frame variable strings
output: (char *[4]) strings = {
(char *) strings[0] = 0x0000000100000f0c "Hello",
(char *) strings[1] = 0x0000000100000f12 "Hola",
@@ -53,7 +44,7 @@
(char *) strings[3] = 0x0000000100000f1f "Guten Tag"
}
-runCmd: variable list char_16
+runCmd: frame variable char_16
output: (char [16]) char_16 = {
(char) char_16[0] = 'H',
(char) char_16[1] = 'e',
@@ -73,7 +64,7 @@
(char) char_16[15] = '\0'
}
-runCmd: variable list ushort_matrix
+runCmd: frame variable ushort_matrix
output: (unsigned short [2][3]) ushort_matrix = {
(unsigned short [3]) ushort_matrix[0] = {
(unsigned short) ushort_matrix[0][0] = 0x0001,
@@ -87,7 +78,7 @@
}
}
-runCmd: variable list long_6
+runCmd: frame variable long_6
output: (long [6]) long_6 = {
(long) long_6[0] = 1,
(long) long_6[1] = 2,
@@ -266,6 +257,9 @@
mydir = None
# State pertaining to the inferior process, if any.
+ # This reflects inferior process started through the command interface with
+ # either the lldb "run" or "process launch" command.
+ # See also self.runCmd().
runStarted = False
# Maximum allowed attempts when launching the inferior process.
@@ -310,6 +304,8 @@
self.dbg.SetAsync(False)
# There is no process associated with the debugger as yet.
+ # See also self.tearDown() where it checks whether self.process has a
+ # valid reference and calls self.process.Kill() to kill the process.
self.process = None
# Retrieve the associated command interpreter instance.
More information about the lldb-commits
mailing list