mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 02:05:36 +00:00
update Go bindings for new mem_map API
This commit is contained in:
parent
d725e5fee9
commit
59f4722009
|
@ -84,6 +84,10 @@ func (u *Uc) MemRead(addr, size uint64) ([]byte, error) {
|
|||
return dst, u.MemReadInto(dst, addr)
|
||||
}
|
||||
|
||||
func (u *Uc) MemMap(addr, size uint64) error {
|
||||
return errReturn(C.uc_mem_map(u.Handle, C.uint64_t(addr), C.size_t(size)))
|
||||
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), C.uint32_t(prot)))
|
||||
}
|
||||
|
||||
func (u *Uc) MemMap(addr, size uint64) error {
|
||||
return u.MemMapProt(addr, size, UC_PROT_ALL)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue