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
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@133488 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/types/AbstractBase.py b/test/types/AbstractBase.py
index c7ae11c..96dddcd 100644
--- a/test/types/AbstractBase.py
+++ b/test/types/AbstractBase.py
@@ -44,14 +44,16 @@
# Bring the program to the point where we can issue a series of
# 'frame variable -T' command.
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
- puts_line = line_number ("basic_type.cpp", "// Here is the line we will break on before stepping out")
+ puts_line = line_number ("basic_type.cpp", "// Here is the line we will break on to check variables")
self.expect("breakpoint set -f basic_type.cpp -l %d" % puts_line,
BREAKPOINT_CREATED,
startstr = "Breakpoint created: 1: file ='basic_type.cpp', line = %d, locations = 1" %
puts_line)
- self.expect("run", RUN_SUCCEEDED, patterns = [".*"])
- self.runCmd("thread step-out", STEP_OUT_SUCCEEDED)
+ self.runCmd("run", RUN_SUCCEEDED)
+ self.expect("process status", STOPPED_DUE_TO_BREAKPOINT,
+ substrs = [" at basic_type.cpp:%d" % puts_line,
+ "stop reason = breakpoint"])
#self.runCmd("frame variable -T")
@@ -109,17 +111,15 @@
# Bring the program to the point where we can issue a series of
# 'expr' command.
self.runCmd("file a.out", CURRENT_EXECUTABLE_SET)
- #self.runCmd("breakpoint set --name Puts")
- #self.runCmd("run", RUN_SUCCEEDED)
- puts_line = line_number ("basic_type.cpp", "// Here is the line we will break on before stepping out")
+ puts_line = line_number ("basic_type.cpp", "// Here is the line we will break on to check variables.")
self.expect("breakpoint set -f basic_type.cpp -l %d" % puts_line,
BREAKPOINT_CREATED,
startstr = "Breakpoint created: 1: file ='basic_type.cpp', line = %d, locations = 1" %
puts_line)
- self.expect("run", RUN_SUCCEEDED, patterns = [".*"])
- self.runCmd ("process status")
-
- self.runCmd("thread step-out", STEP_OUT_SUCCEEDED)
+ self.runCmd("run", RUN_SUCCEEDED)
+ self.expect("process status", STOPPED_DUE_TO_BREAKPOINT,
+ substrs = [" at basic_type.cpp:%d" % puts_line,
+ "stop reason = breakpoint"])
#self.runCmd("frame variable -T")
diff --git a/test/types/basic_type.cpp b/test/types/basic_type.cpp
index 75ad397..149c22b 100644
--- a/test/types/basic_type.cpp
+++ b/test/types/basic_type.cpp
@@ -82,11 +82,6 @@
#include <stdint.h>
#include <stdio.h>
-void Puts(char const *msg)
-{
- puts(msg); // Here is the line we will break on before stepping out
-}
-
int
main (int argc, char const *argv[])
{
@@ -173,6 +168,6 @@
printf ("(a_union_zero_t[]) a_union_zero_array_unbounded[1].a = '" T_PRINTF_FORMAT "'\n", a_union_zero_array_unbounded[1].a);
#endif
- Puts("About to exit, break here to check values...");
+ puts("About to exit, break here to check values..."); // Here is the line we will break on to check variables.
return 0;
}