aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.trace/save-trace.exp
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>2010-03-31 17:59:49 +0000
committerStan Shebs <shebs@codesourcery.com>2010-03-31 17:59:49 +0000
commit8bf6485c1cee41f31564e1097199ff67a3615ebe (patch)
treeb7579caf3a6e8a889331ba48e7b6bfcb9acc1d29 /gdb/testsuite/gdb.trace/save-trace.exp
parentf3c8116cd2e02ccb2bd1bfc131554027b2efe190 (diff)
downloadgdb-8bf6485c1cee41f31564e1097199ff67a3615ebe.zip
gdb-8bf6485c1cee41f31564e1097199ff67a3615ebe.tar.gz
gdb-8bf6485c1cee41f31564e1097199ff67a3615ebe.tar.bz2
2010-03-31 Stan Shebs <stan@codesourcery.com>
* breakpoint.c (tracepoint_save_command): Include variables, conditionals, tracepoint types, and default-collect. * tracepoint.c (save_trace_state_variables): New function. * tracepoint.h (save_trace_state_variables): Declare it. * gdb.trace/save-trace.exp: Test save/restore of default-collect and tracepoint conditionals. (gdb_verify_tracepoints): Delete unused return.
Diffstat (limited to 'gdb/testsuite/gdb.trace/save-trace.exp')
-rw-r--r--gdb/testsuite/gdb.trace/save-trace.exp14
1 files changed, 12 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.trace/save-trace.exp b/gdb/testsuite/gdb.trace/save-trace.exp
index 0a20b12..87f76ab 100644
--- a/gdb/testsuite/gdb.trace/save-trace.exp
+++ b/gdb/testsuite/gdb.trace/save-trace.exp
@@ -73,6 +73,10 @@ foreach x { 1 2 3 4 5 6 } {
"Setting tracepoint $trcpt.* to $x" \
"10.x: set passcount for tracepoint $trcpt"
+ gdb_test "condition $trcpt $x - 1 == $x / 2" \
+ "" \
+ "10.x: set condition for tracepoint $trcpt"
+
gdb_trace_setactions "10.x: set actions for tracepoint $x" \
"" \
"collect q$x" "^$" \
@@ -81,6 +85,9 @@ foreach x { 1 2 3 4 5 6 } {
"end" "^$"
}
+gdb_test "set default-collect gdb_char_test, gdb_long_test - 100" \
+ "" \
+ "10: set default-collect"
proc gdb_verify_tracepoints { testname } {
global gdb_prompt;
@@ -91,7 +98,7 @@ proc gdb_verify_tracepoints { testname } {
set result "pass";
send_gdb "info tracepoints\n";
gdb_expect 10 {
- -re "\[0-9\]+\[\t \]+tracepoint\[\t \]+keep y\[\t \]+0x\[0-9a-fA-F\]+ in gdb_recursion_test\[^\r\n\]+" {
+ -re "\[0-9\]+\[\t \]+tracepoint\[\t \]+keep y\[\t \]+0x\[0-9a-fA-F\]+ in gdb_recursion_test\[^\r\n\]+\r\n\[ \t]+trace only if \[0-9\] - 1 == \[0-9\] / 2" {
# if { $expect_out(1,string) != $ourstate } {
# set result "fail";
# }
@@ -110,7 +117,10 @@ proc gdb_verify_tracepoints { testname } {
}
}
$result $testname;
- return $result;
+
+ gdb_test "show default-collect" \
+ "The list of expressions to collect by default is \"gdb_char_test, gdb_long_test - 100\"..*" \
+ "10: show default-collect"
}
gdb_verify_tracepoints "10.x: verify trace setup";