@@ -14,11 +14,10 @@ pub type AddressType = *mut ::libc::c_void;
14
14
target_os = "linux" ,
15
15
any(
16
16
all(
17
- target_arch = "x86_64" ,
17
+ any ( target_arch = "x86_64" , target_arch = "aarch64" ) ,
18
18
any( target_env = "gnu" , target_env = "musl" )
19
19
) ,
20
20
all( target_arch = "x86" , target_env = "gnu" ) ,
21
- all( target_arch = "aarch64" , target_env = "gnu" ) ,
22
21
all( target_arch = "riscv64" , target_env = "gnu" ) ,
23
22
) ,
24
23
) ) ]
@@ -334,8 +333,13 @@ pub fn getregs(pid: Pid) -> Result<user_regs_struct> {
334
333
/// [ptrace(2)]: https://www.man7.org/linux/man-pages/man2/ptrace.2.html
335
334
#[ cfg( all(
336
335
target_os = "linux" ,
337
- target_env = "gnu" ,
338
- any( target_arch = "aarch64" , target_arch = "riscv64" )
336
+ any(
337
+ all(
338
+ target_arch = "aarch64" ,
339
+ any( target_env = "gnu" , target_env = "musl" )
340
+ ) ,
341
+ all( target_arch = "riscv64" , target_env = "gnu" )
342
+ )
339
343
) ) ]
340
344
pub fn getregs ( pid : Pid ) -> Result < user_regs_struct > {
341
345
getregset :: < regset:: NT_PRSTATUS > ( pid)
@@ -344,12 +348,17 @@ pub fn getregs(pid: Pid) -> Result<user_regs_struct> {
344
348
/// Get a particular set of user registers, as with `ptrace(PTRACE_GETREGSET, ...)`
345
349
#[ cfg( all(
346
350
target_os = "linux" ,
347
- target_env = "gnu" ,
348
351
any(
349
- target_arch = "x86_64" ,
350
- target_arch = "x86" ,
351
- target_arch = "aarch64" ,
352
- target_arch = "riscv64" ,
352
+ all(
353
+ target_env = "gnu" ,
354
+ any(
355
+ target_arch = "x86_64" ,
356
+ target_arch = "x86" ,
357
+ target_arch = "aarch64" ,
358
+ target_arch = "riscv64"
359
+ )
360
+ ) ,
361
+ all( target_env = "musl" , target_arch = "aarch64" )
353
362
)
354
363
) ) ]
355
364
pub fn getregset < S : RegisterSet > ( pid : Pid ) -> Result < S :: Regs > {
@@ -408,8 +417,13 @@ pub fn setregs(pid: Pid, regs: user_regs_struct) -> Result<()> {
408
417
/// [ptrace(2)]: https://www.man7.org/linux/man-pages/man2/ptrace.2.html
409
418
#[ cfg( all(
410
419
target_os = "linux" ,
411
- target_env = "gnu" ,
412
- any( target_arch = "aarch64" , target_arch = "riscv64" )
420
+ any(
421
+ all(
422
+ target_env = "gnu" ,
423
+ any( target_arch = "aarch64" , target_arch = "riscv64" )
424
+ ) ,
425
+ all( target_env = "musl" , target_arch = "aarch64" )
426
+ )
413
427
) ) ]
414
428
pub fn setregs ( pid : Pid , regs : user_regs_struct ) -> Result < ( ) > {
415
429
setregset :: < regset:: NT_PRSTATUS > ( pid, regs)
@@ -418,12 +432,17 @@ pub fn setregs(pid: Pid, regs: user_regs_struct) -> Result<()> {
418
432
/// Set a particular set of user registers, as with `ptrace(PTRACE_SETREGSET, ...)`
419
433
#[ cfg( all(
420
434
target_os = "linux" ,
421
- target_env = "gnu" ,
422
435
any(
423
- target_arch = "x86_64" ,
424
- target_arch = "x86" ,
425
- target_arch = "aarch64" ,
426
- target_arch = "riscv64" ,
436
+ all(
437
+ target_env = "gnu" ,
438
+ any(
439
+ target_arch = "x86_64" ,
440
+ target_arch = "x86" ,
441
+ target_arch = "aarch64" ,
442
+ target_arch = "riscv64"
443
+ )
444
+ ) ,
445
+ all( target_env = "musl" , target_arch = "aarch64" )
427
446
)
428
447
) ) ]
429
448
pub fn setregset < S : RegisterSet > ( pid : Pid , mut regs : S :: Regs ) -> Result < ( ) > {
0 commit comments