From a7b354c8e0db8204fdfa885a205a86e2e6c28bb1 Mon Sep 17 00:00:00 2001 From: jD91mZM2 <me@krake.one> Date: Sun, 4 Aug 2019 19:42:49 +0200 Subject: [PATCH] Update to latest syscall after merging ptrace --- Cargo.lock | 6 +++--- Cargo.toml | 3 +-- src/platform/redox/ptrace.rs | 6 +++--- tests/expected/ptrace.stdout | 29 +++++++++++++++++++++++++++++ 4 files changed, 36 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0ff818745..912ece338 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -163,7 +163,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "redox_syscall" version = "0.1.56" -source = "git+https://gitlab.redox-os.org/jD91mZM2/syscall?branch=ptrace-6#51f0ef2826ef2b0369766c8f23c8069ae0a56846" +source = "git+https://gitlab.redox-os.org/redox-os/syscall?rev=0e1e7d5d#0e1e7d5d36f8c6f045e30c37515d366350eb2122" dependencies = [ "bitflags 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -187,7 +187,7 @@ dependencies = [ "posix-regex 0.1.0", "ralloc 1.0.0", "rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.56 (git+https://gitlab.redox-os.org/jD91mZM2/syscall?branch=ptrace-6)", + "redox_syscall 0.1.56 (git+https://gitlab.redox-os.org/redox-os/syscall?rev=0e1e7d5d)", "sc 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "spin 0.4.10 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -293,7 +293,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum rand 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9" "checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" "checksum rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d0e7a549d590831370895ab7ba4ea0c1b6b011d106b5ff2da6eee112615e6dc0" -"checksum redox_syscall 0.1.56 (git+https://gitlab.redox-os.org/jD91mZM2/syscall?branch=ptrace-6)" = "<none>" +"checksum redox_syscall 0.1.56 (git+https://gitlab.redox-os.org/redox-os/syscall?rev=0e1e7d5d)" = "<none>" "checksum redox_syscall 0.1.56 (registry+https://github.com/rust-lang/crates.io-index)" = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" "checksum rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "c5f5376ea5e30ce23c03eb77cbe4962b988deead10910c372b226388b594c084" "checksum rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" diff --git a/Cargo.toml b/Cargo.toml index 0afc424d7..c532b3b7a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -38,8 +38,7 @@ optional = true sc = "0.2.2" [target.'cfg(target_os = "redox")'.dependencies] -redox_syscall = { git = "https://gitlab.redox-os.org/jD91mZM2/syscall", branch = "ptrace-6" } -# redox_syscall = { path = "/home/user/redox-nix/redox/kernel/syscall" } +redox_syscall = { git = "https://gitlab.redox-os.org/redox-os/syscall", rev = "0e1e7d5d" } spin = "0.4.10" [features] diff --git a/src/platform/redox/ptrace.rs b/src/platform/redox/ptrace.rs index 9672f3270..f506d78f9 100644 --- a/src/platform/redox/ptrace.rs +++ b/src/platform/redox/ptrace.rs @@ -124,11 +124,11 @@ fn inner_ptrace( sys_ptrace::PTRACE_SYSCALL => syscall, // Skip the first post-syscall when connected sys_ptrace::PTRACE_SYSEMU if session.first => { - syscall::PTRACE_FLAG_SYSEMU | syscall::PTRACE_STOP_PRE_SYSCALL + syscall::PTRACE_FLAG_IGNORE | syscall::PTRACE_STOP_PRE_SYSCALL } - sys_ptrace::PTRACE_SYSEMU => syscall::PTRACE_FLAG_SYSEMU | syscall, + sys_ptrace::PTRACE_SYSEMU => syscall::PTRACE_FLAG_IGNORE | syscall, sys_ptrace::PTRACE_SYSEMU_SINGLESTEP => { - syscall::PTRACE_FLAG_SYSEMU | syscall::PTRACE_STOP_SINGLESTEP + syscall::PTRACE_FLAG_IGNORE | syscall::PTRACE_STOP_SINGLESTEP } _ => unreachable!("unhandled ptrace request type {}", request), })?; diff --git a/tests/expected/ptrace.stdout b/tests/expected/ptrace.stdout index 8cc46e622..c2e762dd8 100644 --- a/tests/expected/ptrace.stdout +++ b/tests/expected/ptrace.stdout @@ -1 +1,30 @@ +----- Pre-syscall ----- +Wait... +Get regs +Set regs +Post-syscall +Wait... +----- Pre-syscall ----- +Wait... +Get regs +Set regs +Post-syscall +Wait... +----- Pre-syscall ----- +Wait... +Get regs +Set regs +Post-syscall +Wait... +----- Pre-syscall ----- +Wait... +Get regs +Set regs +Post-syscall +Wait... +----- Pre-syscall ----- +Wait... +Get regs +Post-syscall +Wait... Child exited with status 0 -- GitLab