Documentation
¶
Index ¶
- Constants
- type ExecConfig
- type Task
- func (t *Task) Arch() *models.Arch
- func (t *Task) Bits() uint
- func (t *Task) ByteOrder() binary.ByteOrder
- func (t *Task) HookMapAdd(mapCb models.MapCb, unmap models.UnmapCb, prot models.ProtCb) *models.MapHook
- func (t *Task) HookMapDel(hook *models.MapHook)
- func (t *Task) Malloc(size uint64, desc string) (uint64, error)
- func (t *Task) Mappings() cpu.Pages
- func (t *Task) MemMap(addr, size uint64, prot int) error
- func (t *Task) MemProt(addr, size uint64, prot int) error
- func (t *Task) MemReadInto(p []byte, addr uint64) error
- func (t *Task) MemReserve(addr, size uint64, fixed bool) (*cpu.Page, error)
- func (t *Task) MemUnmap(addr, size uint64) error
- func (t *Task) Mmap(addr, size uint64, prot int, fixed bool, desc string, file *cpu.FileDesc) (uint64, error)
- func (t *Task) OS() string
- func (t *Task) PackAddr(buf []byte, n uint64) ([]byte, error)
- func (t *Task) Pop() (uint64, error)
- func (t *Task) PopBytes(p []byte) error
- func (t *Task) Push(n uint64) (uint64, error)
- func (t *Task) PushBytes(p []byte) (uint64, error)
- func (t *Task) RegDump() ([]models.RegVal, error)
- func (t *Task) RegRead(enum int) (uint64, error)
- func (t *Task) RegReadBatch(regs []int) ([]uint64, error)
- func (t *Task) RegWrite(enum int, val uint64) error
- func (t *Task) UnpackAddr(buf []byte) uint64
- type Usercorn
- func (u *Usercorn) Base() uint64
- func (u *Usercorn) BinEntry() uint64
- func (u *Usercorn) Brk(addr uint64) (uint64, error)
- func (u *Usercorn) Close() error
- func (u *Usercorn) Entry() uint64
- func (u *Usercorn) Exe() string
- func (u *Usercorn) Exit(err error)
- func (u *Usercorn) Fs() *ramfs.Filesystem
- func (u *Usercorn) GetCPU() *cpu.Cpu
- func (u *Usercorn) LoadBinary(f *os.File) error
- func (u *Usercorn) Loader() loader.Loader
- func (u *Usercorn) MapStack(base, size uint64, guard bool) error
- func (u *Usercorn) Restart(fn func(models.Usercorn, error) error)
- func (u *Usercorn) Run() error
- func (u *Usercorn) SetEntry(entry uint64)
- func (u *Usercorn) SetExit(exit uint64)
- func (u *Usercorn) Start(pc, end uint64) error
- func (u *Usercorn) StrucAt(addr uint64) *models.StrucStream
- func (u *Usercorn) Syscall(num int, name string, getArgs models.SysGetArgs) (uint64, error)
- func (u *Usercorn) Trampoline(fun func() error) error
Constants ¶
View Source
const ( BASE = 0x100000 UC_MEM_ALIGN = 0x1000 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExecConfig ¶
ExecConfig describes the arguments and environment that should be passed to the executable.
type Task ¶
func (*Task) HookMapAdd ¶
func (*Task) HookMapDel ¶
func (*Task) MemReserve ¶
func (*Task) UnpackAddr ¶
type Usercorn ¶
type Usercorn struct { *Task StackBase uint64 StackSize uint64 // contains filtered or unexported fields }
func NewUsercornWrapper ¶
func NewUsercornWrapper(exe string, t *Task, fs *ramfs.Filesystem, l loader.Loader, os *models.OS, c *ExecConfig) *Usercorn
NewUsercornWrapper is just a hacky woraround that usercorn has privat fields. TODO(felberj) remove
func (*Usercorn) LoadBinary ¶
LoadBinary is just a hacky workaround to load the binary into memory.
func (*Usercorn) Trampoline ¶
Click to show internal directories.
Click to hide internal directories.