x86

package
v0.0.0-...-fed3a35 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const A_CODE = 0x18
View Source
const A_CODE_READABLE = 0x2
View Source
const A_DATA = 0x10
View Source
const A_DATA_WRITABLE = 0x2
View Source
const A_DIR_CON_BIT = 0x4
View Source
const A_EXEC = 0x8
View Source
const A_PRESENT = 0x80
View Source
const A_PRIV_0 = 0x0
View Source
const A_PRIV_3 = 0x60
View Source
const F_PROT_32 = 0x4
View Source
const GDT_ENTRY_SIZE = 0x8
View Source
const S_GDT = 0x0
View Source
const S_PRIV_0 = 0x0
View Source
const S_PRIV_3 = 0x3

Variables

View Source
var Arch = &models.Arch{
	Name: "x86",
	Bits: 32,

	Cpu: &cpu.Builder{Arch: uc.ARCH_X86, Mode: uc.MODE_32},

	PC: uc.X86_REG_EIP,
	SP: uc.X86_REG_ESP,
	Regs: map[string]int{
		"eip": uc.X86_REG_EIP,
		"esp": uc.X86_REG_ESP,
		"ebp": uc.X86_REG_EBP,
		"eax": uc.X86_REG_EAX,
		"ebx": uc.X86_REG_EBX,
		"ecx": uc.X86_REG_ECX,
		"edx": uc.X86_REG_EDX,
		"esi": uc.X86_REG_ESI,
		"edi": uc.X86_REG_EDI,

		"eflags": uc.X86_REG_EFLAGS,

		"cs": uc.X86_REG_CS,
		"ds": uc.X86_REG_DS,
		"es": uc.X86_REG_ES,
		"fs": uc.X86_REG_FS,
		"gs": uc.X86_REG_GS,
		"ss": uc.X86_REG_SS,
	},
	DefaultRegs: []string{
		"eax", "ebx", "ecx", "edx", "esi", "edi", "ebp",
	},
}

Functions

func DarwinInit

func DarwinInit(u models.Usercorn, args, env []string) error

func DarwinInterrupt

func DarwinInterrupt(u models.Usercorn, intno uint32)

func DarwinKernels

func DarwinKernels(u models.Usercorn) []interface{}

func DarwinSyscall

func DarwinSyscall(u models.Usercorn, class int)

func LinuxInterrupt

func LinuxInterrupt(u models.Usercorn, intno uint32)

func LinuxKernels

func LinuxKernels(u models.Usercorn) []interface{}

func LinuxSyscall

func LinuxSyscall(u models.Usercorn)

func Rdmsr

func Rdmsr(u models.Usercorn, msr uint64) uint64

func Wrmsr

func Wrmsr(u models.Usercorn, msr, value uint64)

Types

type LinuxKernel

type LinuxKernel struct {
	*linux.LinuxKernel
	// contains filtered or unexported fields
}

func (*LinuxKernel) SetThreadArea

func (k *LinuxKernel) SetThreadArea(addr uint64) int

func (*LinuxKernel) Socketcall

func (k *LinuxKernel) Socketcall(index int, params co.Buf) uint64

Jump to

Keyboard shortcuts

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