authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-07-31 10:57:12-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-07-31 10:57:12-07:00
logb7e37f9ddce4cd3eaaf31a4577fb74d7a22a6193
tree8e0805bda62686ea0c9ed7105c8e5dc0c269a7c5
parentfaa6daef9981060eccf832b1c21d50929aa327dd

Revert "std.c: add ptrace for freebsd support."

This reverts commit b754068fbc7492962953068d31386d4c04e37ae5.

1 files changed, 0 insertions(+), 114 deletions(-)

lib/std/c/freebsd.zig-114
......@@ -2704,117 +2704,3 @@ pub const RF = struct {
27042704};
27052705
27062706pub extern "c" fn rfork(flags: c_int) c_int;
2707
2708pub const PTRACE = struct {
2709 pub const EXC = 0x0001;
2710 pub const SCE = 0x0002;
2711 pub const SCX = 0x0004;
2712 pub const SYSCALL = (PTRACE.SCE | PTRACE.SCX);
2713 pub const FORK = 0x0008;
2714 pub const LWP = 0x0010;
2715 pub const VFORK = 0x0020;
2716 pub const DEFAULT = PTRACE.EXEC;
2717};
2718
2719pub const PT = struct {
2720 pub const TRACE_ME = 0;
2721 pub const READ_I = 1;
2722 pub const READ_D = 2;
2723 pub const WRITE_I = 4;
2724 pub const WRITE_D = 5;
2725 pub const CONTINUE = 7;
2726 pub const KILL = 8;
2727 pub const STEP = 9;
2728 pub const ATTACH = 10;
2729 pub const DETACH = 11;
2730 pub const IO = 12;
2731 pub const LWPINFO = 13;
2732 pub const GETNUMLWPS = 14;
2733 pub const GETLWPLIST = 15;
2734 pub const CLEARSTEP = 16;
2735 pub const SETSTEP = 17;
2736 pub const SUSPEND = 18;
2737 pub const RESUME = 19;
2738 pub const TO_SCE = 20;
2739 pub const TO_SCX = 21;
2740 pub const SYSCALL = 22;
2741 pub const FOLLOW_FORK = 23;
2742 pub const LWP_EVENTS = 24;
2743 pub const GET_EVENT_MASK = 25;
2744 pub const SET_EVENT_MASK = 26;
2745 pub const GET_SC_ARGS = 27;
2746 pub const GET_SC_RET = 28;
2747 pub const COREDUMP = 29;
2748 pub const GETREGS = 33;
2749 pub const SETREGS = 34;
2750 pub const GETFPREGS = 35;
2751 pub const SETFPREGS = 36;
2752 pub const GETDBREGS = 37;
2753 pub const SETDBREGS = 38;
2754 pub const VM_TIMESTAMP = 40;
2755 pub const VM_ENTRY = 41;
2756 pub const GETREGSET = 42;
2757 pub const SETREGSET = 43;
2758 pub const SC_REMOTE = 44;
2759 pub const FIRSTMACH = 64;
2760};
2761
2762pub const ptrace_io_desc = extern struct {
2763 op: c_int,
2764 offs: ?*anyopaque,
2765 addr: ?*anyopaque,
2766 len: usize,
2767};
2768
2769pub const PIOD = struct {
2770 pub const READ_D = 1;
2771 pub const WRITE_D = 2;
2772 pub const READ_I = 3;
2773 pub const WRITE_I = 4;
2774};
2775
2776pub const ptrace_lwpinfo = extern struct {
2777 lwpid: lwpid_t,
2778 event: c_int,
2779 flags: c_int,
2780 sigmask: sigset_t,
2781 siglist: sigset_t,
2782 siginfo: siginfo_t,
2783 tdname: [MAXCOMLEN + 1]u8,
2784 child_pid: pid_t,
2785 syscall_code: c_uint,
2786 syscall_narg: c_uint,
2787};
2788
2789pub const ptrace_sc_ret = extern struct {
2790 retval: [2]isize,
2791 err: c_int,
2792};
2793
2794pub const ptrace_vm_entry = extern struct {
2795 entry: c_int,
2796 timestamp: c_int,
2797 start: c_ulong,
2798 end: c_ulong,
2799 offset: c_ulong,
2800 prot: c_uint,
2801 pathlen: c_uint,
2802 fileid: c_long,
2803 fsid: u32,
2804 pve_path: ?[*:0]u8,
2805};
2806
2807pub const ptrace_coredump = extern struct {
2808 fd: c_int,
2809 flags: u32,
2810 limit: isize,
2811};
2812
2813pub const ptrace_cs_remote = extern struct {
2814 ret: ptrace_sc_ret,
2815 syscall: c_uint,
2816 nargs: c_uint,
2817 args: *isize,
2818};
2819
2820pub extern "c" fn ptrace(request: c_int, pid: pid_t, addr: [*:0]u8, data: c_int) c_int;