aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.trace/backtrace.exp
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2013-07-31 00:44:42 +0000
committerYao Qi <yao@codesourcery.com>2013-07-31 00:44:42 +0000
commitde74e63a5651500a398a4166405c1bfe4a4fe2fd (patch)
tree91904447e2ce04309cf1789c023d48a3357dc35f /gdb/testsuite/gdb.trace/backtrace.exp
parent680558e8361c727a81c7d6b77461e57fedf308c1 (diff)
downloadfsf-binutils-gdb-de74e63a5651500a398a4166405c1bfe4a4fe2fd.zip
fsf-binutils-gdb-de74e63a5651500a398a4166405c1bfe4a4fe2fd.tar.gz
fsf-binutils-gdb-de74e63a5651500a398a4166405c1bfe4a4fe2fd.tar.bz2
gdb/
* tracepoint.c (trace_dump_command): Select the current frame. gdb/testsuite/ * gdb.trace/backtrace.exp (gdb_backtrace_tdp_4): Test command 'tdump' on stack frame 0 and 1 respectively.
Diffstat (limited to 'gdb/testsuite/gdb.trace/backtrace.exp')
-rw-r--r--gdb/testsuite/gdb.trace/backtrace.exp31
1 files changed, 31 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.trace/backtrace.exp b/gdb/testsuite/gdb.trace/backtrace.exp
index e40428f..c3a7ec3 100644
--- a/gdb/testsuite/gdb.trace/backtrace.exp
+++ b/gdb/testsuite/gdb.trace/backtrace.exp
@@ -230,6 +230,37 @@ proc gdb_backtrace_tdp_4 { msg depth traceframe } {
fail "$msg (fewer than $depth stack frames found)"
}
}
+
+ set output_string0 ""
+ # Match the output of command 'tdump' and save it in
+ # $output_string0.
+ set test "tdump on frame 0"
+ gdb_test_multiple "tdump" $test {
+ -re "tdump\[\r\n\]+(.*)\[\r\n\]+$gdb_prompt $" {
+ set output_string0 $expect_out(1,string)
+ }
+ }
+
+ gdb_test "up" ".*" ""
+
+ # Test that command 'tdump' still works properly when the
+ # selected frame is not the current frame, and save the output
+ # in $output_string1.
+ set test "tdump on frame 1"
+ set output_string1 ""
+ gdb_test_multiple "tdump" $test {
+ -re "tdump\[\r\n\]+(.*)\[\r\n\]+$gdb_prompt $" {
+ set output_string1 $expect_out(1,string)
+ }
+ }
+
+ # Output of 'tdump' on frame 0 and frame 1 should be
+ # identical.
+ if ![string compare $output_string0 $output_string1] {
+ pass "tdump output"
+ } else {
+ fail "tdump output"
+ }
}
}