| ... | ... | @@ -1663,6 +1663,23 @@ pub fn perf_event_open( |
| 1663 | 1663 | ); |
| 1664 | 1664 | } |
| 1665 | 1665 | |
| 1666 | pub fn ptrace( |
| 1667 | req: u32, |
| 1668 | pid: pid_t, |
| 1669 | addr: usize, |
| 1670 | data: usize, |
| 1671 | addr2: usize, |
| 1672 | ) usize { |
| 1673 | return syscall5( |
| 1674 | .ptrace, |
| 1675 | req, |
| 1676 | @bitCast(usize, @as(isize, pid)), |
| 1677 | addr, |
| 1678 | data, |
| 1679 | addr2, |
| 1680 | ); |
| 1681 | } |
| 1682 | |
| 1666 | 1683 | pub const E = switch (native_arch) { |
| 1667 | 1684 | .mips, .mipsel => @import("linux/errno/mips.zig").E, |
| 1668 | 1685 | .sparc, .sparcel, .sparcv9 => @import("linux/errno/sparc.zig").E, |
| ... | ... | @@ -5365,3 +5382,40 @@ pub const PERF = struct { |
| 5365 | 5382 | |
| 5366 | 5383 | pub const IOC_FLAG_GROUP = 1; |
| 5367 | 5384 | }; |
| 5385 | |
| 5386 | pub const PTRACE = struct { |
| 5387 | pub const TRACEME = 0; |
| 5388 | pub const PEEKTEXT = 1; |
| 5389 | pub const PEEKDATA = 2; |
| 5390 | pub const PEEKUSER = 3; |
| 5391 | pub const POKETEXT = 4; |
| 5392 | pub const POKEDATA = 5; |
| 5393 | pub const POKEUSER = 6; |
| 5394 | pub const CONT = 7; |
| 5395 | pub const KILL = 8; |
| 5396 | pub const SINGLESTEP = 9; |
| 5397 | pub const GETREGS = 12; |
| 5398 | pub const SETREGS = 13; |
| 5399 | pub const GETFPREGS = 14; |
| 5400 | pub const SETFPREGS = 15; |
| 5401 | pub const ATTACH = 16; |
| 5402 | pub const DETACH = 17; |
| 5403 | pub const GETFPXREGS = 18; |
| 5404 | pub const SETFPXREGS = 19; |
| 5405 | pub const SYSCALL = 24; |
| 5406 | pub const SETOPTIONS = 0x4200; |
| 5407 | pub const GETEVENTMSG = 0x4201; |
| 5408 | pub const GETSIGINFO = 0x4202; |
| 5409 | pub const SETSIGINFO = 0x4203; |
| 5410 | pub const GETREGSET = 0x4204; |
| 5411 | pub const SETREGSET = 0x4205; |
| 5412 | pub const SEIZE = 0x4206; |
| 5413 | pub const INTERRUPT = 0x4207; |
| 5414 | pub const LISTEN = 0x4208; |
| 5415 | pub const PEEKSIGINFO = 0x4209; |
| 5416 | pub const GETSIGMASK = 0x420a; |
| 5417 | pub const SETSIGMASK = 0x420b; |
| 5418 | pub const SECCOMP_GET_FILTER = 0x420c; |
| 5419 | pub const SECCOMP_GET_METADATA = 0x420d; |
| 5420 | pub const GET_SYSCALL_INFO = 0x420e; |
| 5421 | }; |