aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/step-over-syscall.exp
diff options
context:
space:
mode:
authorYao Qi <yao.qi@linaro.org>2016-03-03 09:17:45 +0000
committerYao Qi <yao.qi@linaro.org>2016-03-03 09:17:45 +0000
commitea50786226737509a8f4c2734699a5fc15cc63c4 (patch)
tree824091b157afd845b9cc8918aacd331eb5272f12 /gdb/testsuite/gdb.base/step-over-syscall.exp
parent8fc8cbdaf698ed042d859d5749cff66937bbb57c (diff)
downloadgdb-ea50786226737509a8f4c2734699a5fc15cc63c4.zip
gdb-ea50786226737509a8f4c2734699a5fc15cc63c4.tar.gz
gdb-ea50786226737509a8f4c2734699a5fc15cc63c4.tar.bz2
Reformat gdb.base/step-over-syscall.exp
gdb/testsuite: 2016-03-03 Yao Qi <yao.qi@linaro.org> * gdb.base/step-over-syscall.exp (disp_step_cross_syscall): Fix code format.
Diffstat (limited to 'gdb/testsuite/gdb.base/step-over-syscall.exp')
-rw-r--r--gdb/testsuite/gdb.base/step-over-syscall.exp59
1 files changed, 29 insertions, 30 deletions
diff --git a/gdb/testsuite/gdb.base/step-over-syscall.exp b/gdb/testsuite/gdb.base/step-over-syscall.exp
index 4728ec8..c77ffdc 100644
--- a/gdb/testsuite/gdb.base/step-over-syscall.exp
+++ b/gdb/testsuite/gdb.base/step-over-syscall.exp
@@ -124,46 +124,45 @@ proc step_over_syscall { syscall } {
continue
}
- set ret [setup $syscall]
+ set ret [setup $syscall]
- set syscall_insn_addr [lindex $ret 0]
- set syscall_insn_next_addr [lindex $ret 1]
- if { $syscall_insn_addr == -1 } {
- return -1
- }
+ set syscall_insn_addr [lindex $ret 0]
+ set syscall_insn_next_addr [lindex $ret 1]
+ if { $syscall_insn_addr == -1 } {
+ return -1
+ }
- gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, (.* in |__libc_|)$syscall \\(\\).*" \
- "continue to $syscall (3rd time)"
+ gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, (.* in |__libc_|)$syscall \\(\\).*" \
+ "continue to $syscall (3rd time)"
- # Hit the breakpoint on $syscall for the third time. In this time, we'll set
- # breakpoint on the syscall insn we recorded previously, and single step over it.
+ # Hit the breakpoint on $syscall for the third time. In this time, we'll set
+ # breakpoint on the syscall insn we recorded previously, and single step over it.
- set syscall_insn_bp 0
- gdb_test_multiple "break \*$syscall_insn_addr" "break on syscall insn" {
- -re "Breakpoint (\[0-9\]*) at .*$gdb_prompt $" {
- set syscall_insn_bp $expect_out(1,string)
- pass "break on syscall insns"
+ set syscall_insn_bp 0
+ gdb_test_multiple "break \*$syscall_insn_addr" "break on syscall insn" {
+ -re "Breakpoint (\[0-9\]*) at .*$gdb_prompt $" {
+ set syscall_insn_bp $expect_out(1,string)
+ pass "break on syscall insns"
+ }
}
- }
- gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, .*" \
- "continue to syscall insn $syscall"
+ gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, .*" \
+ "continue to syscall insn $syscall"
- gdb_test_no_output "set displaced-stepping $displaced"
+ gdb_test_no_output "set displaced-stepping $displaced"
- # Check the address of next instruction of syscall.
- if {[gdb_test "stepi" "x/i .*=>.*" "single step over $syscall"] != 0} {
- return -1
- }
-
- check_pc_after_cross_syscall $syscall $syscall_insn_next_addr
+ # Check the address of next instruction of syscall.
+ if {[gdb_test "stepi" "x/i .*=>.*" "single step over $syscall"] != 0} {
+ return -1
+ }
+ check_pc_after_cross_syscall $syscall $syscall_insn_next_addr
- # Delete breakpoint syscall insns to avoid interference to other syscalls.
- delete_breakpoints
+ # Delete breakpoint syscall insns to avoid interference to other syscalls.
+ delete_breakpoints
- gdb_test "break marker" "Breakpoint.*at.* file .*${testfile}.c, line.*"
- gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, marker \\(\\) at.*" \
- "continue to marker ($syscall)"
+ gdb_test "break marker" "Breakpoint.*at.* file .*${testfile}.c, line.*"
+ gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, marker \\(\\) at.*" \
+ "continue to marker ($syscall)"
}
}
}