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.cp/mb-templates.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.cp/mb-templates.exp')
-rw-r--r-- | gdb/testsuite/gdb.cp/mb-templates.exp | 48 |
1 files changed, 4 insertions, 44 deletions
diff --git a/gdb/testsuite/gdb.cp/mb-templates.exp b/gdb/testsuite/gdb.cp/mb-templates.exp index 3a7fbc9..edc1631 100644 --- a/gdb/testsuite/gdb.cp/mb-templates.exp +++ b/gdb/testsuite/gdb.cp/mb-templates.exp @@ -72,17 +72,7 @@ gdb_test_no_output {condition $bpnum i==1} \ "separate condition: set condition" gdb_run_cmd -gdb_expect { - -re "Breakpoint \[0-9\]+,.*foo<int> \\(i=1\\).*$gdb_prompt $" { - pass "separate condition: run to breakpoint" - } - -re "$gdb_prompt $" { - fail "separate condition: run to breakpoint" - } - timeout { - fail "separate condition: run to breakpoint (timeout)" - } -} +gdb_test "" "Breakpoint \[0-9\]+,.*foo<int> \\(i=1\\).*" "separate condition: run to breakpoint" gdb_test "continue" \ ".*Breakpoint.*foo<double> \\(i=1\\).*" \ @@ -94,17 +84,7 @@ gdb_test "continue" \ gdb_test_no_output {disable $bpnum.1} "disabling location: disable" gdb_run_cmd -gdb_expect { - -re "Breakpoint \[0-9\]+,.*foo<double> \\(i=1\\).*$gdb_prompt $" { - pass "disabling location: run to breakpoint" - } - -re "$gdb_prompt $" { - fail "disabling location: run to breakpoint" - } - timeout { - fail "disabling location: run to breakpoint (timeout)" - } -} +gdb_test "" "Breakpoint \[0-9\]+,.*foo<double> \\(i=1\\).*" "disabling location: run to breakpoint" # Try disabling entire breakpoint gdb_test_no_output {enable $bpnum.1} "disabling location: enable" @@ -113,17 +93,7 @@ gdb_test_no_output {enable $bpnum.1} "disabling location: enable" gdb_test_no_output {disable $bpnum} "disable breakpoint: disable" gdb_run_cmd -gdb_expect { - -re "$inferior_exited_re normally.*$gdb_prompt $" { - pass "disable breakpoint: run to breakpoint" - } - -re "$gdb_prompt $" { - fail "disable breakpoint: run to breakpoint" - } - timeout { - fail "disable breakpoint: run to breakpoint (timeout)" - } -} +gdb_test "" "$inferior_exited_re normally.*" "disable breakpoint: run to breakpoint" # Make sure breakpoint can be set on a specific instantion. delete_breakpoints @@ -132,17 +102,7 @@ gdb_test "break 'void foo<int>(int)'" ".*" \ gdb_run_cmd -gdb_expect { - -re ".*Breakpoint \[0-9\]+,.*foo<int> \\(i=0\\).*$gdb_prompt $" { - pass "instantiation: run to breakpoint" - } - -re "$gdb_prompt $" { - fail "instantiation: run to breakpoint" - } - timeout { - fail "instantiation: run to breakpoint (timeout)" - } -} +gdb_test "" "Breakpoint \[0-9\]+,.*foo<int> \\(i=0\\).*" "instantiation: run to breakpoint" gdb_test "continue" \ ".*Breakpoint.*foo<int> \\(i=1\\).*" \ |