update Go bindings for new mem_map API

This commit is contained in:
Ryan Hileman 2015-08-28 23:12:44 -07:00
parent d725e5fee9
commit 59f4722009

View file

@ -84,6 +84,10 @@ func (u *Uc) MemRead(addr, size uint64) ([]byte, error) {
return dst, u.MemReadInto(dst, addr) return dst, u.MemReadInto(dst, addr)
} }
func (u *Uc) MemMap(addr, size uint64) error { func (u *Uc) MemMapProt(addr, size uint64, prot int) error {
return errReturn(C.uc_mem_map(u.Handle, C.uint64_t(addr), C.size_t(size))) return errReturn(C.uc_mem_map(u.Handle, C.uint64_t(addr), C.size_t(size), C.uint32_t(prot)))
}
func (u *Uc) MemMap(addr, size uint64) error {
return u.MemMapProt(addr, size, UC_PROT_ALL)
} }