aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/disp-step-syscall.exp
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2012-02-29 14:59:41 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2012-02-29 14:59:41 +0000
commit9a7f938f9358df20af9630b5e3be9f8a049c27d8 (patch)
treee80c59231e95ef404a7e88a82dbe8f8b69ef10e4 /gdb/testsuite/gdb.base/disp-step-syscall.exp
parentffdf6de517ce5a903c28a67a8f6e57ce7714e9c1 (diff)
downloadgdb-9a7f938f9358df20af9630b5e3be9f8a049c27d8.zip
gdb-9a7f938f9358df20af9630b5e3be9f8a049c27d8.tar.gz
gdb-9a7f938f9358df20af9630b5e3be9f8a049c27d8.tar.bz2
gdb/
Fix disp-step-syscall.exp: fork: single step over fork. * i386-linux-tdep.c (-i386_linux_get_syscall_number): Rename to ... (i386_linux_get_syscall_number_from_regcache): ... here, new function comment, change parameters gdbarch and ptid to regcache. Remove parameter regcache, initialize gdbarch from regcache here. (i386_linux_get_syscall_number, i386_linux_displaced_step_copy_insn): New functions. (i386_linux_init_abi): Install i386_linux_displaced_step_copy_insn instead. * i386-tdep.c (i386_syscall_p): Check also for 'sysenter' and 'syscall'. Make the 'int' check more strict. gdb/testsuite/ Fix disp-step-syscall.exp: fork: single step over fork. * gdb.base/disp-step-syscall.exp (syscall_insn): Anchor it by whitespaces. (single step over $syscall): Remove its check. (single step over $syscall final pc): New check.
Diffstat (limited to 'gdb/testsuite/gdb.base/disp-step-syscall.exp')
-rw-r--r--gdb/testsuite/gdb.base/disp-step-syscall.exp13
1 files changed, 11 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.base/disp-step-syscall.exp b/gdb/testsuite/gdb.base/disp-step-syscall.exp
index c62938c..4cf5529 100644
--- a/gdb/testsuite/gdb.base/disp-step-syscall.exp
+++ b/gdb/testsuite/gdb.base/disp-step-syscall.exp
@@ -25,7 +25,7 @@ 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
}
@@ -118,7 +118,16 @@ proc disp_step_cross_syscall { syscall } { with_test_prefix "$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"
+ gdb_test "stepi" ".*" "single step over $syscall"
+ 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"