@@ -109,11 +109,11 @@ libc_enum!{
109
109
#[ cfg( all( target_os = "linux" , not( any( target_arch = "mips" ,
110
110
target_arch = "mips64" ) ) ) ) ]
111
111
PTRACE_PEEKSIGINFO ,
112
- #[ cfg( all( target_os = "linux" , any ( target_arch = "x86 " ,
113
- target_arch = "x86_64" ) ) ) ]
112
+ #[ cfg( all( target_os = "linux" , target_env = "gnu " ,
113
+ any ( target_arch = "x86" , target_arch = "x86_64" ) ) ) ]
114
114
PTRACE_SYSEMU ,
115
- #[ cfg( all( target_os = "linux" , any ( target_arch = "x86 " ,
116
- target_arch = "x86_64" ) ) ) ]
115
+ #[ cfg( all( target_os = "linux" , target_env = "gnu " ,
116
+ any ( target_arch = "x86" , target_arch = "x86_64" ) ) ) ]
117
117
PTRACE_SYSEMU_SINGLESTEP ,
118
118
}
119
119
}
@@ -308,7 +308,7 @@ pub fn syscall<T: Into<Option<Signal>>>(pid: Pid, sig: T) -> Result<()> {
308
308
/// In contrast to the `syscall` function, the syscall stopped at will not be executed.
309
309
/// Thus the the tracee will only be stopped once per syscall,
310
310
/// optionally delivering a signal specified by `sig`.
311
- #[ cfg( all( target_os = "linux" , any( target_arch = "x86" , target_arch = "x86_64" ) ) ) ]
311
+ #[ cfg( all( target_os = "linux" , target_env = "gnu" , any( target_arch = "x86" , target_arch = "x86_64" ) ) ) ]
312
312
pub fn sysemu < T : Into < Option < Signal > > > ( pid : Pid , sig : T ) -> Result < ( ) > {
313
313
let data = match sig. into ( ) {
314
314
Some ( s) => s as i32 as * mut c_void ,
@@ -431,7 +431,7 @@ pub fn step<T: Into<Option<Signal>>>(pid: Pid, sig: T) -> Result<()> {
431
431
/// Advances the execution by a single step or until the next syscall.
432
432
/// In case the tracee is stopped at a syscall, the syscall will not be executed.
433
433
/// Optionally, the signal specified by `sig` is delivered to the tracee upon continuation.
434
- #[ cfg( all( target_os = "linux" , any( target_arch = "x86" , target_arch = "x86_64" ) ) ) ]
434
+ #[ cfg( all( target_os = "linux" , target_env = "gnu" , any( target_arch = "x86" , target_arch = "x86_64" ) ) ) ]
435
435
pub fn step_or_sysemu < T : Into < Option < Signal > > > ( pid : Pid , sig : T ) -> Result < ( ) > {
436
436
let data = match sig. into ( ) {
437
437
Some ( s) => s as i32 as * mut c_void ,
0 commit comments