Skip to content

Commit e5cc4b6

Browse files
author
Johnny Chen
committed
Simplify the the generic AbstractBase.py test base for testing variable types.
We still have the the issue where running: ./dotest.py -v types we have test failures where the inferior either runs to exited with status 0 or the inferior stops but not because of breakpoint (for example): runCmd: process status output: Process 90060 stopped * thread #1: tid = 0x2d03, 0x000000010000e2ca, stop reason = EXC_BAD_ACCESS (code=2, address=0x10000e2ca) frame #0: 0x000000010000e2ca There are two cases where the inferior stops for the breakpoint (good), but the expression parser prints out the wrong information. The two failures are: Failure-TestFloatTypesExpr.FloatTypesExprTestCase.test_double_type_with_dsym.log Failure-TestFloatTypesExpr.FloatTypesExprTestCase.test_double_type_with_dwarf.log I'll file a radar on the two expression parser misbehave, while continue investigating why the inferior stops for the wrong reason or does not stop at all. For now, you'll need to do: ./dotest.py -v -w types llvm-svn: 133488
1 parent 1f94705 commit e5cc4b6

File tree

2 files changed

+11
-16
lines changed

2 files changed

+11
-16
lines changed

lldb/test/types/AbstractBase.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,16 @@ def generic_type_tester(self, atoms, quotedDisplay=False):
4444
# Bring the program to the point where we can issue a series of
4545
# 'frame variable -T' command.
4646
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
47-
puts_line = line_number ("basic_type.cpp", "// Here is the line we will break on before stepping out")
47+
puts_line = line_number ("basic_type.cpp", "// Here is the line we will break on to check variables")
4848
self.expect("breakpoint set -f basic_type.cpp -l %d" % puts_line,
4949
BREAKPOINT_CREATED,
5050
startstr = "Breakpoint created: 1: file ='basic_type.cpp', line = %d, locations = 1" %
5151
puts_line)
5252

53-
self.expect("run", RUN_SUCCEEDED, patterns = [".*"])
54-
self.runCmd("thread step-out", STEP_OUT_SUCCEEDED)
53+
self.runCmd("run", RUN_SUCCEEDED)
54+
self.expect("process status", STOPPED_DUE_TO_BREAKPOINT,
55+
substrs = [" at basic_type.cpp:%d" % puts_line,
56+
"stop reason = breakpoint"])
5557

5658
#self.runCmd("frame variable -T")
5759

@@ -109,17 +111,15 @@ def generic_type_expr_tester(self, atoms, quotedDisplay=False):
109111
# Bring the program to the point where we can issue a series of
110112
# 'expr' command.
111113
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
112-
#self.runCmd("breakpoint set --name Puts")
113-
#self.runCmd("run", RUN_SUCCEEDED)
114-
puts_line = line_number ("basic_type.cpp", "// Here is the line we will break on before stepping out")
114+
puts_line = line_number ("basic_type.cpp", "// Here is the line we will break on to check variables.")
115115
self.expect("breakpoint set -f basic_type.cpp -l %d" % puts_line,
116116
BREAKPOINT_CREATED,
117117
startstr = "Breakpoint created: 1: file ='basic_type.cpp', line = %d, locations = 1" %
118118
puts_line)
119-
self.expect("run", RUN_SUCCEEDED, patterns = [".*"])
120-
self.runCmd ("process status")
121-
122-
self.runCmd("thread step-out", STEP_OUT_SUCCEEDED)
119+
self.runCmd("run", RUN_SUCCEEDED)
120+
self.expect("process status", STOPPED_DUE_TO_BREAKPOINT,
121+
substrs = [" at basic_type.cpp:%d" % puts_line,
122+
"stop reason = breakpoint"])
123123

124124
#self.runCmd("frame variable -T")
125125

lldb/test/types/basic_type.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,6 @@ typedef struct a_union_nonzero_tag {
8282
#include <stdint.h>
8383
#include <stdio.h>
8484

85-
void Puts(char const *msg)
86-
{
87-
puts(msg); // Here is the line we will break on before stepping out
88-
}
89-
9085
int
9186
main (int argc, char const *argv[])
9287
{
@@ -173,6 +168,6 @@ main (int argc, char const *argv[])
173168
printf ("(a_union_zero_t[]) a_union_zero_array_unbounded[1].a = '" T_PRINTF_FORMAT "'\n", a_union_zero_array_unbounded[1].a);
174169

175170
#endif
176-
Puts("About to exit, break here to check values...");
171+
puts("About to exit, break here to check values..."); // Here is the line we will break on to check variables.
177172
return 0;
178173
}

0 commit comments

Comments
 (0)