strace_types

package
v0.0.0-...-4e6bda9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OR = iota
	AND
	XOR
	NOT
	LSHIFT
	RSHIFT
	ONESCOMP
	TIMES
	LAND
	LOR
	LEQUAL
)

Variables

View Source
var (
	Strace_ExpressionType = "Expression Type"
	Strace_CallType       = "Call Type"
	Strace_IntType        = "Int Type"
	Strace_FieldType      = "Field Type"
	Strace_StructType     = "Struct Type"
	Strace_ArrayType      = "Array Type"
	Strace_PointerType    = "Pointer Type"
	Strace_BufferType     = "Buffer Type"
	Strace_FlagType       = "Flag Type"
	Strace_Ipv4Type       = "Ipv4 Type"
)
View Source
var (
	EnabledSyscalls = map[string]bool{}

	Unsupported = map[string]bool{
		"brk": true,

		"":       true,
		"execve": true,
		"access": true,

		"gettimeofday": true,
		"kill":         true,

		"arch_prctl": true,

		"getcwd":        true,
		"setdomainname": true,
		"reboot":        true,
		"getppid":       true,
		"umask":         true,
		"adjtimex":      true,

		"rt_sigprocmask":         true,
		"rt_sigaction":           true,
		"rt_sigtimedwait":        true,
		"sysfs":                  true,
		"chdir":                  true,
		"clone":                  true,
		"newfstatat":             true,
		"getsid":                 true,
		"getcpu":                 true,
		"sched_get_priority_min": true,
		"sched_get_priority_max": true,
	}

	VMACall = map[string]bool{
		"mmap":             true,
		"munmap":           true,
		"mremap":           true,
		"msync":            true,
		"mprotect":         true,
		"remap_file_pages": true,
		"shmat":            true,
		"mlock":            true,
		"munlock":          true,
		"madvise":          true,
	}

	Accept_labels = map[string]string{
		"fd":            "",
		"sock":          "",
		"sock_alg":      "$alg",
		"sock_in":       "$inet",
		"sock_in6":      "$inet6",
		"sock_netrom":   "$netrom",
		"sock_nfc_llcp": "$nfc_llcp",
		"sock_sctp":     "$sctp",
		"sock_unix":     "$unix",
		"sock_netlink":  "$inet6",
	}

	Bind_labels = map[string]string{
		"fd":             "",
		"sock":           "",
		"sock_alg":       "$alg",
		"sock_bt_hci":    "$bt_hci",
		"sock_bt_l2cap":  "$bt_l2cap",
		"sock_bt_rfcomm": "$bt_rfcomm",
		"sock_bt_sco":    "$bt_sco",
		"sock_in":        "$inet",
		"sock_in6":       "$inet6",
		"sock_netlink":   "$netlink",
		"sock_netrom":    "$netrom",
		"sock_nfc_llcp":  "$nfc_llcp",
		"sock_sctp":      "$sctp",
		"sock_unix":      "$unix",
		"AF_INET":        "$inet",
		"AF_INET6":       "$inet6",
		"sock_packet":    "$packet",
	}

	Connect_labels = map[string]string{
		"fd":             "",
		"sock":           "",
		"sock_bt_l2cap":  "$bt_l2cap",
		"sock_bt_rfcomm": "$bt_rfcomm",
		"sock_bt_sco":    "$bt_sco",
		"sock_in":        "$inet",
		"sock_in6":       "$inet6",
		"sock_netlink":   "$netlink",
		"sock_netrom":    "$netrom",
		"sock_nfc_llcp":  "$nfc_llcp",
		"sock_nfc_raw":   "$nfc_raw",
		"sock_sctp":      "$sctp",
		"sock_unix":      "$unix",
		"AF_INET":        "$inet",
		"AF_INET6":       "$inet6",
	}

	Bpf_labels = map[string]string{
		"BPF_PROG_LOAD": "$PROG_LOAD",
	}

	Setsockopt_labels = map[Pair]string{}/* 158 elements not displayed */

	Getsockopt_labels = map[Pair]string{}/* 155 elements not displayed */

	Getsockname_labels = map[string]string{
		"fd":           "",
		"sock":         "",
		"sock_in":      "$inet",
		"sock_in6":     "$inet6",
		"sock_netlink": "$netlink",
		"sock_netrom":  "$netrom",
		"sock_sctp":    "$sctp",
		"sock_unix":    "$unix",
	}

	SocketLevel_map = map[string]string{
		"SOL_SOCKET": "SOL_SOCKET",
		"SOL_IPV6":   "IPPROTO_IPV6",
		"SOL_ICMPV6": "SOL_ICMPV6",
		"SOL_TCP":    "IPPROTO_TCP",
		"SOL_RAW":    "IPPROTO_ICMP",
		"SOL_PACKET": "SOL_PACKET",
		"SOL_IP":     "IPPROTO_IP",
		"SOL_SCTP":   "SOL_SCTP",
	}

	Sendto_labels = map[string]string{
		"fd":           "",
		"sock":         "",
		"sock_in":      "$inet",
		"sock_in6":     "$inet6",
		"sock_sctp":    "$sctp",
		"sock_unix":    "$unix",
		"sock_netlink": "$inet6",
	}

	Sendmsg_labels = map[string]string{
		"fd":            "",
		"sock":          "",
		"sock_in6":      "",
		"sock_in":       "",
		"sock_sctp":     "$sctp",
		"sock_unix":     "$unix",
		"sock_algconn":  "$alg",
		"sock_kcm":      "$kcm",
		"sock_netlink":  "$netlink",
		"sock_netrom":   "$netrom",
		"sock_nfc_llcp": "$nfc_llcp",
	}

	Recvfrom_labels = map[string]string{
		"fd":           "",
		"sock":         "",
		"sock_in":      "$inet",
		"sock_in6":     "$inet6",
		"sock_sctp":    "$sctp",
		"sock_unix":    "$unix",
		"sock_netlink": "$inet6",
		"sock_packet":  "$packet",
	}

	Ioctl_map = map[string]string{
		"FIONBIO":         "$int_in",
		"FIOASYNC":        "$int_in",
		"FS_IOC_GETFLAGS": "$int_out",
		"FS_IOC_SETFLAGS": "$int_in",
		"SIOCGIFINDEX":    "$sock_SIOCGIFINDEX",
	}

	Socket_labels_pair = map[Pair]string{
		Pair{"AF_INET", "SOCK_STREAM"}:  "$inet",
		Pair{"AF_INET", "SOCK_DGRAM"}:   "$inet",
		Pair{"AF_INET", "SOCK_STREAM"}:  "$inet",
		Pair{"AF_INET", "SOCK_STREAM"}:  "$inet",
		Pair{"AF_INET", "SOCK_STREAM"}:  "$inet",
		Pair{"AF_INET", "SOCK_STREAM"}:  "$inet",
		Pair{"AF_INET", "SOCK_STREAM"}:  "$inet",
		Pair{"AF_INET", "SOCK_STREAM"}:  "$inet",
		Pair{"AF_INET", "SOCK_STREAM"}:  "$inet",
		Pair{"AF_INET", "SOCK_STREAM"}:  "$inet",
		Pair{"AF_INET", "SOCK_RAW"}:     "$inet_icmp_raw",
		Pair{"AF_PACKET", "SOCK_RAW"}:   "$packet",
		Pair{"AF_PACKET", "SOCK_DGRAM"}: "$packet",
		Pair{"AF_INET", "SOL_SCTP"}:     "$inet_sctp",
	}
	Socket_labels = map[string]string{
		"AF_INET":    "$inet",
		"AF_INET6":   "$inet6",
		"AF_KCM":     "$kcm",
		"AF_UNIX":    "$unix",
		"AF_NETLINK": "$netlink",
		"AF_PACKET":  "$packet",
	}

	Fcntl_labels = map[string]string{
		"F_DUPFD":         "$dupfd",
		"F_DUPFD_CLOEXEC": "$dupfd",
		"F_GETFD":         "$getflags",
		"F_GETFL":         "$getflags",
		"F_GETSIG":        "$getflags",
		"F_GETLEASE":      "$getflags",
		"F_GETPIPE_SZ":    "$getflags",
		"F_GET_SEALS":     "$getflags",
		"F_SETFD":         "$setflags",
		"F_SETFL":         "$setstatus",
		"F_SETLK":         "$lock",
		"F_SETLKW":        "$lock",
		"F_GETLK":         "$lock",
		"F_GETOWN":        "$getown",
		"F_SETOWN":        "$setown",
		"F_GETOWN_EX":     "$getownex",
		"F_SETOWN_EX":     "$setownex",
		"F_SETSIG":        "$setsig",
		"F_SETLEASE":      "$setlease",
		"DN_MULTISHOT":    "$notify",
		"DN_ACCESS":       "$notify",
		"DN_MODIFY":       "$notify",
		"DN_CREATE":       "$notify",
		"DN_DELETE":       "$notify",
		"DN_RENAME":       "$notify",
		"DN_ATTRIB":       "$notify",
		"F_SETPIPE_SZ":    "$setpipe",
		"F_ADD_SEALS":     "$addseals",
	}

	Keyctl_labels = map[string]string{
		"KEYCTL_GET_KEYRING_ID":       "$get_keyring_id",
		"KEYCTL_JOIN_SESSION_KEYRING": "$join",
		"KEYCTL_UPDATE":               "$update",
		"KEYCTL_REVOKE":               "$revoke",
		"KEYCTL_DESCRIBE":             "$describe",
		"KEYCTL_CLEAR":                "$clear",
		"KEYCTL_LINK":                 "$link",
		"KEYCTL_UNLINK":               "$unlink",
		"KEYCTL_SEARCH":               "$search",
		"KEYCTL_READ":                 "$read",
		"KEYCTL_CHOWN":                "$chown",
		"KEYCTL_SETPERM":              "$setperm",
		"KEYCTL_INSTANTIATE":          "$instantiate",
		"KEYCTL_NEGATE":               "$negate",
		"KEYCTL_SET_REQKEY_KEYRING":   "$set_reqkey_keyring",
		"KEYCTL_SET_TIMEOUT":          "$set_timeout",
		"KEYCTL_ASSUME_AUTHORITY":     "$assume_authority",
		"KEYCTL_GET_SECURITY":         "$get_security",
		"KEYCTL_SESSION_TO_PARENT":    "$session_to_parent",
		"KEYCTL_REJECT":               "$reject",
		"KEYCTL_INSTANTIATE_IOV":      "$instantiate_iov",
		"KEYCTL_INVALIDATE":           "$invalidate",
		"KEYCTL_GET_PERSISTENT":       "$get_persistent",
	}

	Prctl_labels = map[string]string{
		"PR_GET_DUMPABLE":             "$void",
		"PR_GET_KEEPCAPS":             "$void",
		"PR_GET_NO_NEW_PRIVS":         "$void",
		"PR_GET_SECCOMP":              "$void",
		"PR_GET_SECUREBITS":           "$void",
		"PR_GET_TIMERSLACK":           "$void",
		"PR_GET_TIMING":               "$void",
		"PR_TASK_PERF_EVENTS_DISABLE": "$void",
		"PR_TASK_PERF_EVENTS_ENABLE":  "$void",
		"PR_MCE_KILL_GE":              "$void",
		"PR_CAPBSET_READ":             "$intptr",
		"PR_CAPBSET_DROP":             "$intptr",
		"PR_SET_CHILD_SUBREAPER":      "$intptr",
		"PR_SET_DUMPABLE":             "$intptr",
		"PR_SET_FPEMU":                "$intptr",
		"PR_SET_KEEPCAPS":             "$intptr",
		"PR_SET_NO_NEW_PRIVS":         "$intptr",
		"PR_SET_PDEATHSIG":            "$intptr",
		"PR_SET_SECUREBITS":           "$intptr",
		"PR_SET_TIMERSLACK":           "$intptr",
		"PR_SET_TIMING":               "$intptr",
		"PR_SET_TSC":                  "$intptr",
		"PR_SET_UNALIGN":              "$intptr",
		"PR_MCE_KILL":                 "$intptr",
		"PR_GET_CHILD_SUBREAPER":      "$getreaper",
		"PR_GET_ENDIAN":               "$getreaper",
		"PR_GET_FPEMU":                "$getreaper",
		"PR_GET_FPEXC":                "$getreaper",
		"PR_GET_PDEATHSIG":            "$getreaper",
		"PR_GET_TID_ADDRESS":          "$getreaper",
		"PR_GET_TSC":                  "$getreaper",
		"PR_GET_UNALIGN":              "$getreaper",
		"PR_SET_ENDIAN":               "$setendian",
		"PR_SET_FPEXC":                "$setfpexc",
		"PR_SET_NAME":                 "$setname",
		"PR_GET_NAME":                 "$getname",
		"PR_SET_PTRACER":              "$setptracer",
	}

	Special_Consts = map[string]uint64{
		"_LINUX_CAPABILITY_VERSION_1":                uint64(0x19980330),
		"_LINUX_CAPABILITY_VERSION_2":                uint64(0x20071026),
		"_LINUX_CAPABILITY_VERSION_3":                uint64(0x20080522),
		"PROT_NONE":                                  0,
		"O_ASYNC":                                    uint64(0x0040),
		"O_TMPFILE":                                  uint64(0x022000000),
		"SIGUSR1":                                    uint64(10),
		"SIGALRM":                                    uint64(14),
		"SIGFPE":                                     uint64(8),
		"SIG_0":                                      uint64(0),
		"S_ISUID":                                    uint64(0x0004000),
		"S_ISGID":                                    uint64(0x0002000),
		"RLIM64_INFINITY":                            ^uint64(0),
		"CLOCK_REALTIME_ALARM":                       uint64(8),
		"CLOCK_BOOTTIME_ALARM":                       uint64(9),
		"PERF_ATTR_SIZE_VER5":                        uint64(112),
		"PERF_ATTR_SIZE_VER4":                        uint64(104),
		"PERF_ATTR_SIZE_VER3":                        uint64(96),
		"PERF_ATTR_SIZE_VER2":                        uint64(80),
		"PERF_ATTR_SIZE_VER1":                        uint64(72),
		"PERF_ATTR_SIZE_VER0":                        uint64(64),
		"PERF_COUNT_HW_CPU_CYCLES":                   uint64(0),
		"PERF_COUNT_HW_INSTRUCTIONS":                 uint64(1),
		"PERF_COUNT_HW_CACHE_REFERENCES":             uint64(2),
		"PERF_COUNT_HW_CACHE_MISSES":                 uint64(3),
		"PERF_COUNT_HW_BRANCH_INSTRUCTIONS":          uint64(4),
		"PERF_COUNT_HW_BRANCH_MISSES":                uint64(5),
		"PERF_COUNT_HW_BUS_CYCLES":                   uint64(6),
		"PERF_COUNT_HW_STALLED_CYCLES_FRONTEND":      uint64(7),
		"PERF_COUNT_HW_STALLED_CYCLES_BACKEND":       uint64(8),
		"PERF_COUNT_HW_REF_CPU_CYCLES":               uint64(9),
		"PERF_COUNT_SW_CPU_CLOCK":                    uint64(0),
		"PERF_COUNT_SW_TASK_CLOCK":                   uint64(1),
		"PERF_COUNT_SW_PAGE_FAULTS":                  uint64(2),
		"PERF_COUNT_SW_CONTEXT_SWITCHES":             uint64(3),
		"PERF_COUNT_SW_CPU_MIGRATIONS":               uint64(4),
		"PERF_COUNT_SW_PAGE_FAULTS_MIN":              uint64(5),
		"PERF_COUNT_SW_PAGE_FAULTS_MAJ":              uint64(6),
		"PERF_COUNT_SW_ALIGNMENT_FAULTS":             uint64(7),
		"PERF_COUNT_SW_EMULATION_FAULTS":             uint64(8),
		"FUTEX_WAIT_PRIVATE":                         uint64(128),
		"FUTEX_WAKE_PRIVATE":                         uint64(129),
		"FUTEX_WAIT_REQUEUE_PI_PRIVATE":              uint64(139),
		"FUTEX_UNLOCK_PI_PRIVATE":                    uint64(135),
		"FUTEX_CMP_REQUEUE_PI_PRIVATE":               uint64(140),
		"MCL_ONFAULT":                                uint64(32768),
		"CAP_CHOWN":                                  uint64(0),
		"CAP_DAC_OVERRIDE":                           uint64(1),
		"CAP_DAC_READ_SEARCH":                        uint64(2),
		"CAP_FOWNER":                                 uint64(3),
		"CAP_FSETID":                                 uint64(4),
		"CAP_KILL":                                   uint64(5),
		"CAP_SETGID":                                 uint64(6),
		"CAP_SETUID":                                 uint64(7),
		"CAP_SETPCAP":                                uint64(8),
		"CAP_LINUX_IMMUTABLE":                        uint64(9),
		"CAP_NET_BIND_SERVICE":                       uint64(10),
		"CAP_NET_BROADCAST":                          uint64(11),
		"CAP_NET_ADMIN":                              uint64(12),
		"CAP_NET_RAW":                                uint64(13),
		"CAP_IPC_LOCK":                               uint64(14),
		"CAP_IPC_OWNER":                              uint64(15),
		"CAP_SYS_MODULE":                             uint64(16),
		"CAP_SYS_RAWIO":                              uint64(17),
		"CAP_SYS_CHROOT":                             uint64(18),
		"CAP_SYS_PTRACE":                             uint64(19),
		"CAP_SYS_PACCT":                              uint64(20),
		"CAP_SYS_ADMIN":                              uint64(21),
		"CAP_SYS_BOOT":                               uint64(22),
		"CAP_SYS_NICE":                               uint64(23),
		"CAP_SYS_RESOURCE":                           uint64(24),
		"CAP_SYS_TIME":                               uint64(25),
		"CAP_SYS_TTY_CONFIG":                         uint64(26),
		"CAP_MKNOD":                                  uint64(27),
		"CAP_LEASE":                                  uint64(28),
		"CAP_AUDIT_WRITE":                            uint64(29),
		"CAP_AUDIT_CONTROL":                          uint64(30),
		"CAP_SETFCAP":                                uint64(31),
		"FALLOC_FL_COLLAPSE_RANGE":                   uint64(0x08),
		"FALLOC_FL_ZERO_RANGE":                       uint64(0x10),
		"FALLOC_FL_INSERT_RANGE":                     uint64(0x20),
		"FALLOC_FL_UNSHARE_RANGE":                    uint64(0x40),
		"MEMBARRIER_CMD_QUERY":                       uint64(0),
		"MEMBARRIER_CMD_GLOBAL":                      uint64(1 << 0),
		"MEMBARRIER_CMD_GLOBAL_EXPEDITED":            uint64(1 << 1),
		"MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED":   uint64(1 << 2),
		"MEMBARRIER_CMD_PRIVATE_EXPEDITED":           uint64(1 << 3),
		"MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED":  uint64(1 << 4),
		"MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE": uint64(1 << 5),
		"MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE": uint64(1 << 6),
		"MEMBARRIER_CMD_SHARED":                               uint64(1 << 0),
		"SIGUSR2":                                             31,
		"R_OK":                                                uint64(4),
		"W_OK":                                                uint64(2),
		"X_OK":                                                uint64(1),
		"F_OK":                                                uint64(0),
	}
)

Functions

func ConstArg

func ConstArg(t prog.Type, v uint64) prog.Arg

func DataArg

func DataArg(t prog.Type, data []byte) prog.Arg

func GetSyzType

func GetSyzType(typ prog.Type) string

func GroupArg

func GroupArg(t prog.Type, inner []prog.Arg) prog.Arg

func PointerArg

func PointerArg(t prog.Type, page uint64, off int, npages uint64, obj prog.Arg) prog.Arg

func ResultArg

func ResultArg(t prog.Type, r prog.Arg, v uint64) prog.Arg

func ReturnArg

func ReturnArg(t prog.Type) prog.Arg

func UnionArg

func UnionArg(t prog.Type, opt prog.Arg, typ prog.Type) prog.Arg

Types

type ArrayType

type ArrayType struct {
	Elems []Type
	Len   int
}

func NewArrayType

func NewArrayType(elems []Type) (typ *ArrayType)

func (*ArrayType) Name

func (a *ArrayType) Name() string

func (*ArrayType) String

func (a *ArrayType) String() string

type BinarySet

type BinarySet struct {
	Expr1 *Expression
	Expr2 *Expression
}

func NewBinarySet

func NewBinarySet(expr1 *Expression, expr2 *Expression) *BinarySet

func (*BinarySet) Name

func (b *BinarySet) Name() string

func (*BinarySet) String

func (b *BinarySet) String() string

type Binop

type Binop struct {
	Operand1 *Expression
	Op       Operation
	Operand2 *Expression
}

func NewBinop

func NewBinop(operand1 *Expression, op Operation, operand2 *Expression) (b *Binop)

func (*Binop) Eval

func (b *Binop) Eval(target *prog.Target) uint64

func (*Binop) Name

func (b *Binop) Name() string

func (*Binop) String

func (b *Binop) String() string

type BufferType

type BufferType struct {
	Val string
}

func NewBufferType

func NewBufferType(val string) (typ *BufferType)

func (*BufferType) Name

func (b *BufferType) Name() string

func (*BufferType) String

func (b *BufferType) String() string

type Call

type Call struct {
	CallName string
	Args     []Type
}

func NewCallType

func NewCallType(name string, args []Type) (typ *Call)

func (*Call) Name

func (c *Call) Name() string

func (*Call) String

func (c *Call) String() string

type DynamicType

type DynamicType struct {
	BeforeCall *Expression
	AfterCall  *Expression
}

func NewDynamicType

func NewDynamicType(before, after Type) *DynamicType

func (*DynamicType) Name

func (d *DynamicType) Name() string

func (*DynamicType) String

func (d *DynamicType) String() string

type Expression

type Expression struct {
	BinOp         *Binop
	Unop          *Unop
	FlagType      *FlagType
	IntType       *IntType
	MacroType     *Macro
	BinarySetType *BinarySet
}

func NewExpression

func NewExpression(typ Type) (exp *Expression)

func (*Expression) Eval

func (e *Expression) Eval(target *prog.Target) uint64

func (*Expression) Name

func (r *Expression) Name() string

func (*Expression) String

func (r *Expression) String() string

type Field

type Field struct {
	Key string
	Val Type
}

func NewField

func NewField(key string, val Type) (f *Field)

func (*Field) Name

func (f *Field) Name() string

func (*Field) String

func (f *Field) String() string

type FlagType

type FlagType struct {
	Val string
}

func NewFlagType

func NewFlagType(val string) (typ *FlagType)

func (*FlagType) Eval

func (f *FlagType) Eval(target *prog.Target) uint64

func (*FlagType) Name

func (f *FlagType) Name() string

func (*FlagType) String

func (f *FlagType) String() string

type IntType

type IntType struct {
	Val int64
}

func NewIntType

func NewIntType(val int64) (typ *IntType)

func (*IntType) Eval

func (i *IntType) Eval(target *prog.Target) uint64

func (*IntType) Name

func (i *IntType) Name() string

func (*IntType) String

func (i *IntType) String() string

type IpType

type IpType struct {
	Str string
}

func NewIpType

func NewIpType(val string) (typ *IpType)

func (*IpType) Name

func (i *IpType) Name() string

func (*IpType) String

func (i *IpType) String() string

type Macro

type Macro struct {
	MacroName string
	Args      []Type
}

func NewMacroType

func NewMacroType(name string, args []Type) (typ *Macro)

func (*Macro) Name

func (m *Macro) Name() string

func (*Macro) String

func (m *Macro) String() string

type Operation

type Operation int

type Pair

type Pair struct {
	A string
	B string
}

type Parenthetical

type Parenthetical struct {
	// contains filtered or unexported fields
}

func NewParenthetical

func NewParenthetical() *Parenthetical

type PointerType

type PointerType struct {
	Address uint64
	Res     Type
}

func NewPointerType

func NewPointerType(addr uint64, res Type) (typ *PointerType)

func NullPointer

func NullPointer() (typ *PointerType)

func (*PointerType) IsNull

func (typ *PointerType) IsNull() bool

func (*PointerType) Name

func (p *PointerType) Name() string

func (*PointerType) String

func (p *PointerType) String() string

type SocketDesc

type SocketDesc struct {
	Domain string
	Type   string
	Proto  string
}

type StructType

type StructType struct {
	Fields []Type
}

func NewStructType

func NewStructType(types []Type) (typ *StructType)

func (*StructType) Name

func (s *StructType) Name() string

func (*StructType) String

func (s *StructType) String() string

type Syscall

type Syscall struct {
	CallName string
	Args     []Type
	Pid      int64
	Ret      int64
	Cover    []uint64
	Paused   bool
	Resumed  bool
}

func NewSyscall

func NewSyscall(pid int64, name string,
	args []Type,
	ret int64,
	paused bool,
	resumed bool) (sys *Syscall)

func (*Syscall) String

func (s *Syscall) String() string

type Trace

type Trace struct {
	Calls []*Syscall
}

func NewTrace

func NewTrace() (trace *Trace)

func (*Trace) Add

func (trace *Trace) Add(call *Syscall) (ret *Syscall)

type TraceTree

type TraceTree struct {
	TraceMap map[int64]*Trace
	Ptree    map[int64][]int64
	RootPid  int64
	Filename string
}

func NewTraceTree

func NewTraceTree() (tree *TraceTree)

func (*TraceTree) Add

func (tree *TraceTree) Add(call *Syscall) *Syscall

func (*TraceTree) Contains

func (tree *TraceTree) Contains(pid int64) bool

func (*TraceTree) String

func (tree *TraceTree) String() string

type Type

type Type interface {
	Name() string
	String() string
}

type Unop

type Unop struct {
	Operand *Expression
	Op      Operation
}

func NewUnop

func NewUnop(operand *Expression, op Operation) (u *Unop)

func (*Unop) Eval

func (u *Unop) Eval(target *prog.Target) uint64

func (*Unop) Name

func (u *Unop) Name() string

func (*Unop) String

func (u *Unop) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL