Skip to content

Commit e1c4a38

Browse files
committed
Auto merge of #3245 - emilengler:musl-sysemu, r=JohnTitor
Support for `PTRACE_SYSEMU` and `PTRACE_SYSEMU_SINGLESTEP` on musl This adds support for the `PTRACE_SYSEMU` and `PTRACE_SYSEMU_SINGLESTEP` on certain musl architectures. I grabbed these constants by doing a `git grep -rnI PTRACE_SYSEMU` in the musl repository and got a list of certain architecture directories. See #1774 By the way: I am not sure if I should have added support for that many architectures, just because musl supports them. After all, the corresponding glibc only supports `x86(_64)` anyway.
2 parents 632c93c + b4aacbe commit e1c4a38

File tree

5 files changed

+15
-0
lines changed

5 files changed

+15
-0
lines changed

src/unix/linux_like/linux/musl/b32/powerpc.rs

+3
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,9 @@ pub const MAP_STACK: ::c_int = 0x020000;
257257
pub const MAP_HUGETLB: ::c_int = 0x040000;
258258
pub const MAP_SYNC: ::c_int = 0x080000;
259259

260+
pub const PTRACE_SYSEMU: ::c_int = 0x1d;
261+
pub const PTRACE_SYSEMU_SINGLESTEP: ::c_int = 0x1e;
262+
260263
pub const SOCK_STREAM: ::c_int = 1;
261264
pub const SOCK_DGRAM: ::c_int = 2;
262265
pub const SOCK_SEQPACKET: ::c_int = 5;

src/unix/linux_like/linux/musl/b32/x86/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,9 @@ pub const FLUSHO: ::tcflag_t = 0x00001000;
456456
pub const POLLWRNORM: ::c_short = 0x100;
457457
pub const POLLWRBAND: ::c_short = 0x200;
458458

459+
pub const PTRACE_SYSEMU: ::c_int = 31;
460+
pub const PTRACE_SYSEMU_SINGLESTEP: ::c_int = 32;
461+
459462
// Syscall table
460463
pub const SYS_restart_syscall: ::c_long = 0;
461464
pub const SYS_exit: ::c_long = 1;

src/unix/linux_like/linux/musl/b64/powerpc64.rs

+3
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,9 @@ pub const MAP_STACK: ::c_int = 0x020000;
173173
pub const MAP_HUGETLB: ::c_int = 0x040000;
174174
pub const MAP_SYNC: ::c_int = 0x080000;
175175

176+
pub const PTRACE_SYSEMU: ::c_int = 0x1d;
177+
pub const PTRACE_SYSEMU_SINGLESTEP: ::c_int = 0x1e;
178+
176179
pub const SOCK_STREAM: ::c_int = 1;
177180
pub const SOCK_DGRAM: ::c_int = 2;
178181

src/unix/linux_like/linux/musl/b64/s390x.rs

+3
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@ pub const MAP_STACK: ::c_int = 0x020000;
179179
pub const MAP_HUGETLB: ::c_int = 0x040000;
180180
pub const MAP_SYNC: ::c_int = 0x080000;
181181

182+
pub const PTRACE_SYSEMU: ::c_int = 31;
183+
pub const PTRACE_SYSEMU_SINGLESTEP: ::c_int = 32;
184+
182185
pub const EDEADLOCK: ::c_int = 35;
183186
pub const ENAMETOOLONG: ::c_int = 36;
184187
pub const ENOLCK: ::c_int = 37;

src/unix/linux_like/linux/musl/b64/x86_64/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,9 @@ pub const O_RSYNC: ::c_int = 1052672;
682682
pub const O_DSYNC: ::c_int = 4096;
683683
pub const O_ASYNC: ::c_int = 0x2000;
684684

685+
pub const PTRACE_SYSEMU: ::c_int = 31;
686+
pub const PTRACE_SYSEMU_SINGLESTEP: ::c_int = 32;
687+
685688
pub const SIGSTKSZ: ::size_t = 8192;
686689
pub const MINSIGSTKSZ: ::size_t = 2048;
687690

0 commit comments

Comments
 (0)