* Split 'ap' in two cmd0s

* Add missing anal_all() in RCore vapi
This commit is contained in:
pancake 2011-07-05 17:14:39 +02:00
parent 61c9ea4aae
commit a45df6c14f
3 changed files with 16 additions and 11 deletions

View File

@ -1,4 +1,4 @@
/* radare - LGPL - Copyright 2009-2010 */ /* radare - LGPL - Copyright 2009-2011 */
/* pancake<nopcode.org> */ /* pancake<nopcode.org> */
/* nibble<.ds@gmail.com> */ /* nibble<.ds@gmail.com> */

View File

@ -2039,14 +2039,14 @@ static void cmd_syscall_do(RCore *core, int num) {
#if 1 #if 1
/* TODO: Move into cmd_anal() */ /* TODO: Move into cmd_anal() */
static void var_help() { static void var_help() {
eprintf("Try afv?\n"); eprintf("Try afv?\n"
eprintf(" afv 12 int buffer[3]\n"); " afv 12 int buffer[3]\n"
eprintf(" afv 12 byte buffer[1024]\n"); " afv 12 byte buffer[1024]\n"
eprintf("Try af[aAv][gs] [delta] [[addr]]\n"); "Try af[aAv][gs] [delta] [[addr]]\n"
eprintf(" afag 0 = arg0 get\n"); " afag 0 = arg0 get\n"
eprintf(" afvs 12 = var12 set\n"); " afvs 12 = var12 set\n"
eprintf("a = arg, A = fastarg, v = var\n"); "a = arg, A = fastarg, v = var\n"
eprintf("TODO: [[addr]] is not yet implemented. use @\n"); "TODO: [[addr]] is not yet implemented. use @\n");
} }
static int var_cmd(RCore *core, const char *str) { static int var_cmd(RCore *core, const char *str) {
@ -2521,11 +2521,15 @@ static int cmd_anal(void *data, const char *input) {
if (strstr (arch, "x86")) { if (strstr (arch, "x86")) {
switch (bits) { switch (bits) {
case 32: case 32:
r_core_cmd0 (core, "./x 5589e5 && af @@ pre."); r_core_cmd0 (core, "./x 5589e5");
r_core_cmd0 (core, "af @@ pre.");
break; break;
case 64: case 64:
r_core_cmd0 (core, "./x 554989e5 && af @@ pre."); r_core_cmd0 (core, "./x 554989e5");
r_core_cmd0 (core, "af @@ pre.");
break; break;
default:
eprintf ("ap: Unsupported bits: %d\n", bits);
} }
} else { } else {
eprintf ("ap: Unsupported asm.arch and asm.bits\n"); eprintf ("ap: Unsupported asm.arch and asm.bits\n");

View File

@ -50,6 +50,7 @@ public class RCore {
public unowned string disassemble_instr(uint64 addr, int l); public unowned string disassemble_instr(uint64 addr, int l);
public unowned string disassemble_bytes(uint64 addr, int b); public unowned string disassemble_bytes(uint64 addr, int b);
public bool anal_all();
public int anal_search (uint64 from, uint64 to, uint64 ref); public int anal_search (uint64 from, uint64 to, uint64 ref);
public void anal_refs(uint64 addr, int gv); public void anal_refs(uint64 addr, int gv);
public int anal_bb(RAnal.Fcn fcn, uint64 at, int head); public int anal_bb(RAnal.Fcn fcn, uint64 at, int head);