Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(387)

Unified Diff: gdb/testsuite/gdb.base/disp-step-syscall.exp

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/testsuite/gdb.base/dfp-test.exp ('k') | gdb/testsuite/gdb.base/display.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.base/disp-step-syscall.exp
diff --git a/gdb/testsuite/gdb.base/disp-step-syscall.exp b/gdb/testsuite/gdb.base/disp-step-syscall.exp
index 1f23399290680a103bce1810a41a7b317ffe03c3..915cb97476bfc507037a9cf2406fec8269c3efe9 100644
--- a/gdb/testsuite/gdb.base/disp-step-syscall.exp
+++ b/gdb/testsuite/gdb.base/disp-step-syscall.exp
@@ -25,15 +25,14 @@ set syscall_insn ""
# Define the syscall instruction for each target.
if { [istarget "i\[34567\]86-*-linux*"] || [istarget "x86_64-*-linux*"] } {
- set syscall_insn "(int|syscall|sysenter)"
+ set syscall_insn "\[ \t\](int|syscall|sysenter)\[ \t\]"
} else {
return -1
}
-proc disp_step_cross_syscall { syscall } {
+proc disp_step_cross_syscall { syscall } { with_test_prefix "$syscall" {
global syscall_insn
global gdb_prompt
- global pf_prefix
set testfile "disp-step-$syscall"
@@ -47,9 +46,6 @@ proc disp_step_cross_syscall { syscall } {
return
}
- set old_pf_prefix $pf_prefix
- lappend pf_prefix "$syscall:"
-
# Delete the breakpoint on main.
gdb_test_no_output "delete break 1"
@@ -94,7 +90,6 @@ proc disp_step_cross_syscall { syscall } {
if {$see_syscall_insn == 0} then {
fail "find syscall insn in $syscall"
- set pf_prefix $old_pf_prefix
return -1
}
@@ -123,16 +118,40 @@ proc disp_step_cross_syscall { syscall } {
gdb_test_no_output "set displaced-stepping on"
# Check the address of next instruction of syscall.
- gdb_test "stepi" ".*$syscall_insn_next_addr.*" "single step over $syscall"
+ if {$syscall == "vfork" && [is_remote target]} {
+ setup_kfail server/13796 "*-*-*"
+ }
+ set test "single step over $syscall"
+ gdb_test_multiple "stepi" $test {
+ -re "Program terminated with signal SIGILL,.*\r\n$gdb_prompt $" {
+ fail $test
+ return
+ }
+ -re "\\\[Inferior .* exited normally\\\].*\r\n$gdb_prompt $" {
+ fail $test
+ return
+ }
+ -re "\r\n$gdb_prompt $" {
+ pass $test
+ }
+ }
+
+ set syscall_insn_next_addr_found [get_hexadecimal_valueof "\$pc" "0"]
+
+ set test "single step over $syscall final pc"
+ if {$syscall_insn_next_addr != 0
+ && $syscall_insn_next_addr == $syscall_insn_next_addr_found} {
+ pass $test
+ } else {
+ fail $test
+ }
# Delete breakpoint syscall insns to avoid interference to other syscalls.
gdb_test_no_output "delete $syscall_insn_bp" "delete break $syscall insn"
gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, marker \\(\\) at.*" \
"continue to marker ($syscall)"
-
- set pf_prefix $old_pf_prefix
-}
+}}
disp_step_cross_syscall "fork"
disp_step_cross_syscall "vfork"
« no previous file with comments | « gdb/testsuite/gdb.base/dfp-test.exp ('k') | gdb/testsuite/gdb.base/display.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698