radare2/libr/vm/setup.c
pancake c5e588e6e5 * Initial import of libr
- Previous commits has been reported in the ChangeLog file
  - hg log has been lost (moved inside ChangeLog)
  - Old radare1 repository has removed all the libr
2009-02-05 22:08:46 +01:00

29 lines
660 B
C

/* radare - LGPL - Copyright 2008-2009 pancake<nopcode.org> */
#include "r_vm.h"
void r_vm_setup_flags(struct r_vm_t *vm, const char *zf)
{
vm->cpu.zf = strdup(zf);
}
void r_vm_setup_cpu(struct r_vm_t *vm, const char *eip, const char *esp, const char *ebp)
{
vm->cpu.pc = strdup(eip);
vm->cpu.sp = strdup(esp);
vm->cpu.bp = strdup(ebp);
}
void r_vm_setup_fastcall(struct r_vm_t *vm, const char *eax, const char *ebx, const char *ecx, const char *edx)
{
vm->cpu.a0 = strdup(eax);
vm->cpu.a1 = strdup(ebx);
vm->cpu.a2 = strdup(ecx);
vm->cpu.a3 = strdup(edx);
}
void r_vm_setup_ret(struct r_vm_t *vm, const char *eax)
{
vm->cpu.ret = strdup(eax);
}