diff options
author | Yao Qi <yao@codesourcery.com> | 2013-07-31 00:36:22 +0000 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2013-07-31 00:36:22 +0000 |
commit | 48bbe0bf638d8ffc007cb5436fb3dfd30a777683 (patch) | |
tree | 0101215adead5cb209025844a8b7ff7be3231012 /gdb | |
parent | 247f5c4f1a24204373df485a88424064793970cb (diff) | |
download | gdb-48bbe0bf638d8ffc007cb5436fb3dfd30a777683.zip gdb-48bbe0bf638d8ffc007cb5436fb3dfd30a777683.tar.gz gdb-48bbe0bf638d8ffc007cb5436fb3dfd30a777683.tar.bz2 |
gdb/testsuite/
* gdb.trace/backtrace.exp: Don't invoke 'get_exit' and
'gdb_start'.
Invoke 'prepare_for_testing' instead of 'gdb_compile'.
Use gdb_test_no_output to issue commands 'tstart' and 'tstop'.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/testsuite/gdb.trace/backtrace.exp | 25 |
2 files changed, 19 insertions, 13 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 58c2dd7..1ffd9f5 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2013-07-31 Yao Qi <yao@codesourcery.com> + + * gdb.trace/backtrace.exp: Don't invoke 'get_exit' and + 'gdb_start'. + Invoke 'prepare_for_testing' instead of 'gdb_compile'. + Use gdb_test_no_output to issue commands 'tstart' and 'tstop'. + 2013-07-30 Andrew Burgess <aburgess@broadcom.com> * gdb.dwarf2/pieces-optimized-out.exp: Expect "<optimized out>" diff --git a/gdb/testsuite/gdb.trace/backtrace.exp b/gdb/testsuite/gdb.trace/backtrace.exp index e6447ac..5349f02 100644 --- a/gdb/testsuite/gdb.trace/backtrace.exp +++ b/gdb/testsuite/gdb.trace/backtrace.exp @@ -17,21 +17,20 @@ load_lib "trace-support.exp" +standard_testfile actions.c +set executable $testfile +set expfile $testfile.exp -gdb_exit -gdb_start +if [prepare_for_testing $expfile $executable $srcfile \ + [list debug nowarnings]] { + untested "failed to prepare for trace tests" + return -1 +} -standard_testfile actions.c -if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ - executable {debug nowarnings}] != "" } { - untested backtrace.exp +if ![runto_main] { + fail "Can't run to main to check for trace support" return -1 } -gdb_load $binfile -gdb_test "tstop" ".*" "" -gdb_test "tfind none" ".*" "" -runto_main -gdb_reinitialize_dir $srcdir/$subdir if { ![gdb_target_supports_trace] } then { unsupported "Current target does not support trace" @@ -156,14 +155,14 @@ gdb_trace_setactions "8.6: setup TP to collect stack mem cast expr" \ "$tdp6" \ "collect $fpreg, \(\*\(void \*\*\) \($spreg\)\) @ 64" "^$" -gdb_test "tstart" ".*" "" +gdb_test_no_output "tstart" "" gdb_test "break end" ".*" "" gdb_test "continue" \ "Continuing.*Breakpoint $decimal, end.*" \ "run trace experiment" -gdb_test "tstop" ".*" "" +gdb_test_no_output "tstop" "" proc gdb_backtrace_tdp_1 { msg } { global gdb_prompt |