2010-03-30 15:37:15 +00:00
|
|
|
/* radare - LGPL - Copyright 2008-2010 pancake<nopcode.org> */
|
2009-02-05 21:08:46 +00:00
|
|
|
|
|
|
|
#include "r_vm.h"
|
|
|
|
|
2010-03-30 15:37:15 +00:00
|
|
|
R_API int r_vm_mmu_read(RVm *vm, ut64 off, ut8 *data, int len) {
|
2010-03-30 21:12:19 +00:00
|
|
|
if (vm->iob.read_at)
|
|
|
|
return vm->iob.read_at (vm->iob.io, off, data, len);
|
2009-07-16 10:38:49 +00:00
|
|
|
return -1;
|
2009-02-05 21:08:46 +00:00
|
|
|
}
|
|
|
|
|
2010-03-30 15:37:15 +00:00
|
|
|
R_API int r_vm_mmu_write(RVm *vm, ut64 off, ut8 *data, int len) {
|
2010-08-22 15:56:50 +00:00
|
|
|
if (vm->use_mmu_cache && vm->iob.write_at)
|
2010-03-30 21:12:19 +00:00
|
|
|
return vm->iob.write_at (vm->iob.io, off, data, len);
|
2009-07-16 10:38:49 +00:00
|
|
|
return -1;
|
2009-02-05 21:08:46 +00:00
|
|
|
}
|