diff options
author | Pedro Alves <palves@redhat.com> | 2014-09-12 22:16:31 +0100 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2014-09-12 22:16:31 +0100 |
commit | fa43b1d7ca8d9699a253b1f227e91c406a043a0b (patch) | |
tree | cde814e330d7e2657020cf31199edbddc47934fe /gdb/testsuite/gdb.base/chng-syms.exp | |
parent | f37f681c2bb884e74cd33340617a6d1a408d1a75 (diff) | |
download | gdb-fa43b1d7ca8d9699a253b1f227e91c406a043a0b.zip gdb-fa43b1d7ca8d9699a253b1f227e91c406a043a0b.tar.gz gdb-fa43b1d7ca8d9699a253b1f227e91c406a043a0b.tar.bz2 |
after gdb_run_cmd, gdb_expect -> gdb_test_multiple/gdb_test
See:
https://sourceware.org/ml/gdb-patches/2014-09/msg00404.html
We have a number of places that do gdb_run_cmd followed by gdb_expect,
when it would be better to use gdb_test_multiple or gdb_test.
This converts all that "grep gdb_run_cmd -A 2 | grep gdb_expect"
found.
Tested on x86_64 Fedora 20, native and gdbserver.
gdb/testsuite/
2014-09-12 Pedro Alves <palves@redhat.com>
* gdb.arch/gdb1558.exp: Replace uses of gdb_expect after
gdb_run_cmd with gdb_test_multiple or gdb_test throughout.
* gdb.arch/i386-size-overlap.exp: Likewise.
* gdb.arch/i386-size.exp: Likewise.
* gdb.arch/i386-unwind.exp: Likewise.
* gdb.base/a2-run.exp: Likewise.
* gdb.base/break.exp: Likewise.
* gdb.base/charset.exp: Likewise.
* gdb.base/chng-syms.exp: Likewise.
* gdb.base/commands.exp: Likewise.
* gdb.base/dbx.exp: Likewise.
* gdb.base/find.exp: Likewise.
* gdb.base/funcargs.exp: Likewise.
* gdb.base/jit-simple.exp: Likewise.
* gdb.base/reread.exp: Likewise.
* gdb.base/sepdebug.exp: Likewise.
* gdb.base/step-bt.exp: Likewise.
* gdb.cp/mb-inline.exp: Likewise.
* gdb.cp/mb-templates.exp: Likewise.
* gdb.objc/basicclass.exp: Likewise.
* gdb.threads/killed.exp: Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.base/chng-syms.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/chng-syms.exp | 33 |
1 files changed, 7 insertions, 26 deletions
diff --git a/gdb/testsuite/gdb.base/chng-syms.exp b/gdb/testsuite/gdb.base/chng-syms.exp index ac69c50..b5b7d78 100644 --- a/gdb/testsuite/gdb.base/chng-syms.exp +++ b/gdb/testsuite/gdb.base/chng-syms.exp @@ -30,25 +30,10 @@ set timeout 10 verbose "Timeout is now 10 seconds" 2 proc expect_to_stop_here { ident } { - global gdb_prompt - global decimal - # the "at foo.c:36" output we get with -g. # the "in func" output we get without -g. - gdb_expect { - -re "Breakpoint \[0-9\]*, stop_here .*$gdb_prompt $" { - return 1 - } - -re "$gdb_prompt $" { - fail "running to stop_here $ident" - return 0 - } - timeout { - fail "running to stop_here $ident (timeout)" - return 0 - } - } - return 1 + + gdb_test "" "Breakpoint \[0-9\]*, stop_here .*" "running to stop_here $ident" } clean_restart ${binfile} @@ -83,18 +68,14 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb } else { gdb_run_cmd - gdb_expect { + + set test "running with invalidated bpt condition after executable changes" + gdb_test_multiple "" $test { -re ".*$inferior_exited_re normally.*$gdb_prompt $" { - pass "running with invalidated bpt condition after executable changes" + pass $test } -re ".*Breakpoint .*,( 0x.* in)? (\[^ \]*)exit .*$gdb_prompt $" { - pass "running with invalidated bpt condition after executable changes" - } - -re "$gdb_prompt $" { - fail "running with invalidated bpt condition after executable changes" - } - timeout { - fail "(timeout) running with invalidated bpt condition after executable changes" + pass $test } } |