]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove checking vCont;s in exec_cmd_expect_vCont_count
authorYao Qi <yao.qi@linaro.org>
Wed, 21 Oct 2015 15:16:25 +0000 (16:16 +0100)
committerYao Qi <yao.qi@linaro.org>
Wed, 21 Oct 2015 15:16:25 +0000 (16:16 +0100)
Nowadays, in the range-stepping tests, we check not only the number of
vCont;r packets but also the number of vCont;s packets, because we think
the remote target which can do range stepping must support single step.

However, if we turn displaced stepping on, the remote target (GDBserver)
can do range stepping, and support single step, but GDB may decide to
resume instructions in the scratchpad rather than single step them one
by one for displaced stepping.  For example, when aarch64 GDB debugs
arm linux program with aarch64 GDBserver, GDBserver supports both range
stepping and single step, but GDB (with the gdbarch for arm-linux)
decides resume instructions in the scratchpad, so in the RSP traffic,
there is no vCont;s packet at all, and some range-stepping.exp tests
fail,

FAIL: gdb.base/range-stepping.exp: multi insns: next: vCont;s=1 vCont;r=1

This patch is to get rid of the checking to the number of vCont;s in
exec_cmd_expect_vCont_count.

gdb/testsuite:

2015-10-21  Yao Qi  <yao.qi@linaro.org>

* lib/range-stepping-support.exp (exec_cmd_expect_vCont_count):
Remove argument exp_vCont_s.
* gdb.base/range-stepping.exp: Callers updated.
* gdb.trace/range-stepping.exp: Likewise.

gdb/ChangeLog
gdb/testsuite/gdb.base/range-stepping.exp
gdb/testsuite/gdb.trace/range-stepping.exp
gdb/testsuite/lib/range-stepping-support.exp

index 8233d67cbf34ce92fed308fc3d8c1c4b1e882ec6..37e2bb8b759c56cfc1bd1382ee6cea2ea16a218e 100644 (file)
@@ -1,3 +1,10 @@
+2015-10-21  Yao Qi  <yao.qi@linaro.org>
+
+       * lib/range-stepping-support.exp (exec_cmd_expect_vCont_count):
+       Remove argument exp_vCont_s.
+       * gdb.base/range-stepping.exp: Callers updated.
+       * gdb.trace/range-stepping.exp: Likewise.
+
 2015-10-21  Aleksandar Ristovski  <aristovski@qnx.com>
 
        * gdb/nto-tdep.c (QNX_NOTE_NAME, QNX_INFO_SECT_NAME): New defines.
index 2ff371d159f010026a679ea808d696e793d7dadb..79667ba7b7b8b8b96b83b6cf0de7ac5cda478a37 100644 (file)
@@ -55,7 +55,7 @@ with_test_prefix "multi insns" {
     # <-- T05
     # --> vCont;rSTART,END  (range step)
     # <-- T05
-    set result [exec_cmd_expect_vCont_count "next" 1 1]
+    set result [exec_cmd_expect_vCont_count "next" 1]
     if { $result } {
        # This is the first range-stepping test, and the simplest
        # one.  If it fails, probably the rest of the tests would
@@ -111,7 +111,7 @@ with_test_prefix "step over func" {
     # <-- T05  (target stops at ADDR2)
     # --> vCont;rADDR1,ADDR3  (continues range stepping)
     # <-- T05
-    exec_cmd_expect_vCont_count "next" 2
+    exec_cmd_expect_vCont_count "next" 2
 }
 
 # Check that breakpoints interrupt range stepping correctly.
@@ -124,14 +124,14 @@ with_test_prefix "breakpoint" {
     # --> $Z0,ADDR2  (step-resume breakpoint at ADDR2)
     # --> vCont;c  (resume)
     # <-- T05  (target hits the breakpoint at func1)
-    exec_cmd_expect_vCont_count "next" 1
+    exec_cmd_expect_vCont_count "next" 1
 
     gdb_test "backtrace" "#0 .* func1 .*#1 .* main .*" \
        "backtrace from func1"
 
     # A cancelled range step should not confuse the following
     # execution commands.
-    exec_cmd_expect_vCont_count "stepi" 0
+    exec_cmd_expect_vCont_count "stepi" 0
     gdb_test "finish" ".*"
     gdb_test "next" ".*"
     delete_breakpoints
@@ -145,7 +145,7 @@ with_test_prefix "loop" {
     # GDB should send one vCont;r and receive one stop reply:
     # --> vCont;rSTART,END  (range step)
     # <-- T05
-    exec_cmd_expect_vCont_count "next" 1
+    exec_cmd_expect_vCont_count "next" 1
 
     # Confirm the loop completed.
     gdb_test "print a" " = 15"
@@ -162,7 +162,7 @@ with_test_prefix "loop 2" {
     # GDB should send one vCont;r and receive one stop reply:
     # --> vCont;rSTART,END  (range step)
     # <-- T05
-    exec_cmd_expect_vCont_count "next" 1
+    exec_cmd_expect_vCont_count "next" 1
 
     # Confirm the loop completed.
     gdb_test "print a" " = 15"
@@ -207,7 +207,7 @@ with_test_prefix "interrupt" {
 
     # Break the loop earlier and continue range stepping.
     gdb_test "set variable c = 0"
-    exec_cmd_expect_vCont_count "next" 1
+    exec_cmd_expect_vCont_count "next" 1
 }
 
 # Check that range stepping doesn't break software watchpoints.  With
index dfc16d546d3318780a67c84e578d952013d8c6ef..67eddae533f965542b181ce476c5238e69e42126 100644 (file)
@@ -52,8 +52,8 @@ proc range_stepping_with_tracepoint { type } {
 
        # Step a line with a tracepoint in the middle.  The tracepoint
        # itself shouldn't have any effect on range stepping.  We
-       # should see one vCont;r and no vCont;s's.
-       exec_cmd_expect_vCont_count "step" 1
+       # should see one vCont;r.
+       exec_cmd_expect_vCont_count "step" 1
        gdb_test_no_output "tstop"
        gdb_test "tfind" "Found trace frame .*" "first tfind"
        gdb_test "tfind" \
index d6c0e85fb8fea93c7cd47be9e8298ba38931fa0b..1b273093af3bc3742ba483bd94ebdfc6235d5d8b 100644 (file)
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Execute command CMD and check that GDB sends the expected number of
-# vCont;s and vCont;r packets.  Returns 0 if the test passes,
-# otherwise returns 1.
+# vCont;r packet.  Returns 0 if the test passes, otherwise returns 1.
 
-proc exec_cmd_expect_vCont_count { cmd exp_vCont_s exp_vCont_r } {
+proc exec_cmd_expect_vCont_count { cmd exp_vCont_r } {
     global gdb_prompt
 
     gdb_test_no_output "set debug remote 1" ""
 
-    set test "${cmd}: vCont;s=${exp_vCont_s} vCont;r=${exp_vCont_r}"
+    set test "${cmd}: vCont;r=${exp_vCont_r}"
     set r_counter 0
     set s_counter 0
     set ret 1
@@ -40,7 +39,7 @@ proc exec_cmd_expect_vCont_count { cmd exp_vCont_s exp_vCont_r } {
            exp_continue
        }
        -re "$gdb_prompt $" {
-           if { $r_counter == ${exp_vCont_r} && $s_counter == ${exp_vCont_s} } {
+           if { $r_counter == ${exp_vCont_r} } {
                pass $test
                set ret 0
            } else {