This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 6/8] Reformat disp-step-syscall.exp


Make the format of disp-step-syscall.exp correct.

gdb/testsuite:

2016-02-19  Yao Qi  <yao.qi@linaro.org>

	* gdb.base/disp-step-syscall.exp: Format the code.
---
 gdb/testsuite/gdb.base/disp-step-syscall.exp | 50 ++++++++++++++++------------
 1 file changed, 28 insertions(+), 22 deletions(-)

diff --git a/gdb/testsuite/gdb.base/disp-step-syscall.exp b/gdb/testsuite/gdb.base/disp-step-syscall.exp
index 53ac1e1..128bb78 100644
--- a/gdb/testsuite/gdb.base/disp-step-syscall.exp
+++ b/gdb/testsuite/gdb.base/disp-step-syscall.exp
@@ -122,35 +122,41 @@ proc disp_step_cross_syscall { syscall } {
 	foreach displaced $disp_step_opts {
 	    with_test_prefix "displaced $displaced" {
 
-	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 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_pc_after_cross_syscall $syscall $syscall_insn_next_addr
 
-	# Delete breakpoint syscall insns to avoid interference to other syscalls.
-	gdb_test_no_output "delete $syscall_insn_bp" "delete break $syscall insn"
-    }
+		# Delete breakpoint syscall insns to avoid interference
+		# to other syscalls.
+		gdb_test_no_output "delete $syscall_insn_bp" \
+		    "delete break $syscall insn"
+	    }
 	}
 
 	with_test_prefix "break cond on target" {
-- 
1.9.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]