aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2011-12-02 12:43:29 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2011-12-02 12:43:29 +0000
commit968643aaa917f8d1b87ebe6d37e91056e2083756 (patch)
treee8a7ef4a003c31fb955f8b2166fb4acf0130acce /gdb
parent9750bca92c8e67e36ac1b9724abfcb814efaf48f (diff)
downloadgdb-968643aaa917f8d1b87ebe6d37e91056e2083756.zip
gdb-968643aaa917f8d1b87ebe6d37e91056e2083756.tar.gz
gdb-968643aaa917f8d1b87ebe6d37e91056e2083756.tar.bz2
gdb/testsuite/
PR testsuite/12649 * gdb.trace/collection.exp (gdb_collect_return_test): Import gdb_prompt. Protect gdb_test_multiple by final $gdb_prompt match. * gdb.trace/tspeed.exp (gdb_fast_trace_speed_test): Likewise. * gdb.trace/tstatus.exp (run_trace_experiment): Likewise. (test_tracepoints): Likewise.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog9
-rw-r--r--gdb/testsuite/gdb.trace/collection.exp5
-rw-r--r--gdb/testsuite/gdb.trace/tspeed.exp5
-rw-r--r--gdb/testsuite/gdb.trace/tstatus.exp26
4 files changed, 29 insertions, 16 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 3a5716c..ad97d86 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,14 @@
2011-12-02 Jan Kratochvil <jan.kratochvil@redhat.com>
+ PR testsuite/12649
+ * gdb.trace/collection.exp (gdb_collect_return_test): Import gdb_prompt.
+ Protect gdb_test_multiple by final $gdb_prompt match.
+ * gdb.trace/tspeed.exp (gdb_fast_trace_speed_test): Likewise.
+ * gdb.trace/tstatus.exp (run_trace_experiment): Likewise.
+ (test_tracepoints): Likewise.
+
+2011-12-02 Jan Kratochvil <jan.kratochvil@redhat.com>
+
PR breakpoints/13346
* gdb.dwarf2/dw2-objfile-overlap-inner.S: New file.
* gdb.dwarf2/dw2-objfile-overlap-outer.S: New file.
diff --git a/gdb/testsuite/gdb.trace/collection.exp b/gdb/testsuite/gdb.trace/collection.exp
index b1ed30a..59d0459 100644
--- a/gdb/testsuite/gdb.trace/collection.exp
+++ b/gdb/testsuite/gdb.trace/collection.exp
@@ -589,6 +589,7 @@ proc gdb_collect_global_in_pieces_test { } {
}
proc gdb_collect_return_test { } {
+ global gdb_prompt
prepare_for_trace_test
@@ -606,10 +607,10 @@ proc gdb_collect_return_test { } {
# Since we can't guarantee that $_ret will give us the caller,
# pass either way, but giving different messages.
gdb_test_multiple "backtrace" "" {
- -re ".*#1 .* in main .*" {
+ -re ".*#1 .* in main .*\r\n$gdb_prompt $" {
pass "collect \$_ret: backtrace lists main"
}
- -re ".*#1 .* in ?? .*" {
+ -re ".*#1 .* in ?? .*\r\n$gdb_prompt $" {
pass "collect \$_ret: backtrace not listing main"
}
}
diff --git a/gdb/testsuite/gdb.trace/tspeed.exp b/gdb/testsuite/gdb.trace/tspeed.exp
index 9f51a47..407fd88 100644
--- a/gdb/testsuite/gdb.trace/tspeed.exp
+++ b/gdb/testsuite/gdb.trace/tspeed.exp
@@ -89,6 +89,7 @@ proc gdb_slow_trace_speed_test { } {
}
proc gdb_fast_trace_speed_test { } {
+ global gdb_prompt
gdb_delete_tracepoints
@@ -100,11 +101,11 @@ proc gdb_fast_trace_speed_test { } {
gdb_test_multiple "ftrace $testline if (globfoo != 12 && globfoo2 == 45)" \
"set conditional fast tracepoint" {
- -re "Fast tracepoint \[0-9\]+ at .*" {
+ -re "Fast tracepoint \[0-9\]+ at .*\r\n$gdb_prompt $" {
pass "set conditional fast tracepoint, done"
set run_ftrace 1
}
- -re "May not have a fast tracepoint at .*" {
+ -re "May not have a fast tracepoint at .*\r\n$gdb_prompt $" {
pass "set conditional fast tracepoint, not allowed at line"
}
}
diff --git a/gdb/testsuite/gdb.trace/tstatus.exp b/gdb/testsuite/gdb.trace/tstatus.exp
index 36f925d..502366b 100644
--- a/gdb/testsuite/gdb.trace/tstatus.exp
+++ b/gdb/testsuite/gdb.trace/tstatus.exp
@@ -56,6 +56,7 @@ if ![runto_main] {
}
proc run_trace_experiment {} {
+ global gdb_prompt
# gdb_test_no_output "set debug remote 1" ""
@@ -74,10 +75,10 @@ proc run_trace_experiment {} {
# cases.
gdb_test_multiple "tstatus" "check on trace status" {
- -re "Trace is running.*Trace will stop if GDB disconnects\.\[\r\n\]+Trace notes: my tracing note\.\[\r\n\]+Not looking at any trace frame\..*" {
+ -re "Trace is running.*Trace will stop if GDB disconnects\.\[\r\n\]+Trace notes: my tracing note\.\[\r\n\]+Not looking at any trace frame\..*\r\n$gdb_prompt $" {
pass "tstatus reports trace note"
}
- -re "Trace is running.*Trace will stop if GDB disconnects\.\[\r\n\]+Not looking at any trace frame.*" {
+ -re "Trace is running.*Trace will stop if GDB disconnects\.\[\r\n\]+Not looking at any trace frame.*\r\n$gdb_prompt $" {
pass "tstatus does not report any trace note"
}
}
@@ -85,10 +86,10 @@ proc run_trace_experiment {} {
gdb_test "set trace-notes different note" "" "change tracing note"
gdb_test_multiple "tstatus" "check on trace status with diff note" {
- -re "Trace is running.*Trace will stop if GDB disconnects\.\[\r\n\]+Trace notes: different note\.\[\r\n\]+Not looking at any trace frame\..*" {
+ -re "Trace is running.*Trace will stop if GDB disconnects\.\[\r\n\]+Trace notes: different note\.\[\r\n\]+Not looking at any trace frame\..*\r\n$gdb_prompt $" {
pass "tstatus reports different trace note"
}
- -re "Trace is running.*Trace will stop if GDB disconnects\.\[\r\n\]+Not looking at any trace frame.*" {
+ -re "Trace is running.*Trace will stop if GDB disconnects\.\[\r\n\]+Not looking at any trace frame.*\r\n$gdb_prompt $" {
pass "tstatus does not report any different trace note"
}
}
@@ -96,10 +97,10 @@ proc run_trace_experiment {} {
gdb_test "set trace-user me me me" "" "change tracing user"
gdb_test_multiple "tstatus" "check on trace status with diff note" {
- -re "Trace is running.*Trace will stop if GDB disconnects\.\[\r\n\]+Trace user is me me me\.\[\r\n\]+Trace notes: different note\.\[\r\n\]+Not looking at any trace frame\..*" {
+ -re "Trace is running.*Trace will stop if GDB disconnects\.\[\r\n\]+Trace user is me me me\.\[\r\n\]+Trace notes: different note\.\[\r\n\]+Not looking at any trace frame\..*\r\n$gdb_prompt $" {
pass "tstatus reports trace user"
}
- -re "Trace is running.*Trace will stop if GDB disconnects\.\[\r\n\]+Not looking at any trace frame.*" {
+ -re "Trace is running.*Trace will stop if GDB disconnects\.\[\r\n\]+Not looking at any trace frame.*\r\n$gdb_prompt $" {
pass "tstatus does not report trace user"
}
}
@@ -107,10 +108,10 @@ proc run_trace_experiment {} {
gdb_test_no_output "tstop because I can" "trace stopped with note"
gdb_test_multiple "tstatus" "check on trace status after stop" {
- -re "Trace stopped by a tstop command (because I can)\..*Trace will stop if GDB disconnects\.\[\r\n\]+Trace user is me me me\.\[\r\n\]+Trace notes: different note\.\[\r\n\]+Not looking at any trace frame\..*" {
+ -re "Trace stopped by a tstop command (because I can)\..*Trace will stop if GDB disconnects\.\[\r\n\]+Trace user is me me me\.\[\r\n\]+Trace notes: different note\.\[\r\n\]+Not looking at any trace frame\..*\r\n$gdb_prompt $" {
pass "tstatus reports trace stop reason"
}
- -re "Trace stopped by a tstop command\..*" {
+ -re "Trace stopped by a tstop command\..*\r\n$gdb_prompt $" {
pass "tstatus does not report trace stop reason"
}
}
@@ -118,16 +119,17 @@ proc run_trace_experiment {} {
# Tracepoint hit count is optional, so pass it either way.
gdb_test_multiple "info trace" "show tracepoint state" {
- -re "actions\.c:\[0-9\]+\[\r\n\]+\[\t ]+tracepoint already hit 1 time\[\r\n\]+\[\t ]+collect parm" {
+ -re "actions\.c:\[0-9\]+\[\r\n\]+\[\t ]+tracepoint already hit 1 time\[\r\n\]+\[\t ]+collect parm.*\r\n$gdb_prompt $" {
pass "info trace reports tracepoint hit count"
}
- -re "actions\.c:\[0-9\]+\[\r\n\]+\[\t ]+collect parm" {
+ -re "actions\.c:\[0-9\]+\[\r\n\]+\[\t ]+collect parm.*\r\n$gdb_prompt $" {
pass "info trace does not report tracepoint hit count"
}
}
}
proc test_tracepoints {} {
+ global gdb_prompt
gdb_test "break begin" ".*" ""
@@ -142,10 +144,10 @@ proc test_tracepoints {} {
set fastgood 0
gdb_test_multiple "ftrace gdb_recursion_test" "set fast tracepoint" {
- -re "May not have a fast tracepoint at .*" {
+ -re "May not have a fast tracepoint at .*\r\n$gdb_prompt $" {
pass "4-byte fast tracepoint could not be set"
}
- -re "Fast tracepoint .*" {
+ -re "Fast tracepoint .*\r\n$gdb_prompt $" {
pass "4-byte fast tracepoint is set"
set fastgood 1
}