radare2/libr/vm/extra.c
pancake 675b04e7cd * Integrate r_vm into r_core
- Analyze code in order to do syscall analysis
  - Some fixes in r_vm to make it work
  - Add 'av' command to interact with the virtual machine
  - added r_str_subchr helper func in r_util
2010-08-22 17:56:50 +02:00

23 lines
532 B
C

#include "r_vm.h"
#include "list.h"
R_API int r_vm_op_list(struct r_vm_t *vm) {
struct list_head *pos;
printf("Oplist:\n");
list_for_each(pos, &vm->ops) {
struct r_vm_op_t *o = list_entry(pos, struct r_vm_op_t, list);
printf(" %s = %s\n", o->opcode, o->code);
}
return 0;
}
R_API int r_vm_cmd_op_help() {
printf("avo [op] [expr]\n"
" \"avo call [esp]=eip+$$$,esp=esp+4,eip=$1\n"
" \"avo jmp eip=$1\n"
" \"avo mov $1=$2\n"
"Note: The prefix '\"' quotes the command and does not parses pipes and so\n");
return 0;
}