]> Cypherpunks repositories - gostls13.git/commitdiff
darwin ptrace constants
authorRuss Cox <rsc@golang.org>
Tue, 14 Jul 2009 22:29:29 +0000 (15:29 -0700)
committerRuss Cox <rsc@golang.org>
Tue, 14 Jul 2009 22:29:29 +0000 (15:29 -0700)
R=austin
DELTA=42  (37 added, 5 deleted, 0 changed)
OCL=31618
CL=31633

src/pkg/syscall/types_darwin.c
src/pkg/syscall/ztypes_darwin_386.go
src/pkg/syscall/ztypes_darwin_amd64.go

index 65afd6ca6c42eeaca294040072ac0961533b27b6..e205db155f53cd084d18ff15b17281c8441a5ad9 100644 (file)
@@ -45,6 +45,13 @@ enum
 };
 
 
+// Basic types
+
+typedef short $_C_short;
+typedef int $_C_int;
+typedef long $_C_long;
+typedef long long $_C_long_long;
+
 // Time
 
 typedef struct timespec $Timespec;
@@ -55,7 +62,6 @@ typedef struct timeval $Timeval;
 typedef struct rusage $Rusage;
 typedef struct rlimit $Rlimit;
 
-typedef int $_C_int;
 typedef gid_t $_Gid_t;
 
 // Files
@@ -185,6 +191,14 @@ typedef struct sockaddr_any $RawSockaddrAny;
 typedef socklen_t $_Socklen;
 typedef struct linger $Linger;
 
+// Ptrace requests
+enum {
+       $_PTRACE_TRACEME = PT_TRACE_ME,
+       $_PTRACE_CONT = PT_CONTINUE,
+       $_PTRACE_KILL = PT_KILL,
+};
+
+
 // Events (kqueue, kevent)
 
 enum {
index 29d0d96763b4f5a92d546a1270133a0abf52520e..87bca145fea574a4101dec7aa34db947ff66a710 100644 (file)
@@ -78,6 +78,9 @@ const (
        SizeofSockaddrInet6 = 0x1c;
        SizeofSockaddrAny = 0x1c;
        SizeofSockaddrUnix = 0x6a;
+       _PTRACE_TRACEME = 0;
+       _PTRACE_CONT = 0x7;
+       _PTRACE_KILL = 0x8;
        EVFILT_READ = -0x1;
        EVFILT_WRITE = -0x2;
        EVFILT_AIO = -0x3;
@@ -103,6 +106,14 @@ const (
 
 // Types
 
+type _C_short int16
+
+type _C_int int32
+
+type _C_long int32
+
+type _C_long_long int64
+
 type Timespec struct {
        Sec int32;
        Nsec int32;
@@ -137,8 +148,6 @@ type Rlimit struct {
        Max uint64;
 }
 
-type _C_int int32
-
 type _Gid_t uint32
 
 type Stat_t struct {
index 0523c50a4b357e14966347a5596a522313044673..81a556c82853762f911b4d25013cd10893190638 100644 (file)
@@ -78,6 +78,9 @@ const (
        SizeofSockaddrInet6 = 0x1c;
        SizeofSockaddrAny = 0x1c;
        SizeofSockaddrUnix = 0x6a;
+       _PTRACE_TRACEME = 0;
+       _PTRACE_CONT = 0x7;
+       _PTRACE_KILL = 0x8;
        EVFILT_READ = -0x1;
        EVFILT_WRITE = -0x2;
        EVFILT_AIO = -0x3;
@@ -103,6 +106,14 @@ const (
 
 // Types
 
+type _C_short int16
+
+type _C_int int32
+
+type _C_long int64
+
+type _C_long_long int64
+
 type Timespec struct {
        Sec int64;
        Nsec int64;
@@ -138,8 +149,6 @@ type Rlimit struct {
        Max uint64;
 }
 
-type _C_int int32
-
 type _Gid_t uint32
 
 type Stat_t struct {