- Add r_cmd_free
* r_core
  - Inc/Sub stackptr in the next opcode
* vapi
  - Minor fixup in r_core.vapi
This commit is contained in:
Nibble 2010-05-21 12:42:17 +02:00
parent 427ee36f6a
commit cd58dd21e8
4 changed files with 10 additions and 4 deletions

View File

@ -19,6 +19,11 @@ R_API RCmd *r_cmd_new () {
return cmd;
}
R_API RCmd *r_cmd_free(RCmd *cmd) {
free (cmd);
return NULL;
}
R_API int r_cmd_set_data(struct r_cmd_t *cmd, void *data) {
cmd->data = data;
return 1;

View File

@ -140,12 +140,12 @@ static void r_print_disasm(RPrint *p, RCore *core, ut64 addr, ut8 *buf, int len,
else r_cons_printf ("0x%08"PFMT64x" ", core->offset + idx);
}
if (show_stackptr) {
r_cons_printf ("%3d%s ", stackptr,
stackptr>ostackptr?"+":stackptr<ostackptr?"-":" ");
if (analop.type == R_ANAL_OP_TYPE_RET)
stackptr = 0;
ostackptr = stackptr;
stackptr += analop.stackptr;
r_cons_printf ("%3d%s ", stackptr,
stackptr>ostackptr?"+":stackptr<ostackptr?"-":" ");
}
if (show_bytes) {
char pad[64];

View File

@ -78,6 +78,7 @@ R_API int r_cmd_macro_call(struct r_cmd_macro_t *mac, const char *name);
R_API int r_cmd_macro_break(struct r_cmd_macro_t *mac, const char *value);
R_API RCmd *r_cmd_new();
R_API RCmd *r_cmd_free(RCmd *cmd);
R_API int r_cmd_set_data(struct r_cmd_t *cmd, void *data);
R_API int r_cmd_add(struct r_cmd_t *cmd, const char *command, const char *desc, r_cmd_callback(callback));
R_API int r_cmd_add_long(struct r_cmd_t *cmd, const char *longcmd, const char *shortcmd, const char *desc);

View File

@ -2,7 +2,7 @@
namespace Radare {
[Compact]
[CCode (cheader_filename="r_core.h", cname="struct r_core_t", free_function="r_core_free", cprefix="r_core_")]
[CCode (cheader_filename="r_core.h", cname="RCore", free_function="r_core_free", cprefix="r_core_")]
public class RCore {
public RFlag flags;
public RNum num;
@ -40,7 +40,7 @@ public class RCore {
// XXX mode = Radare.Io.Mode
[Compact]
[CCode (cname="struct r_core_file_t", cprefix="r_core_file_", free_function="")]
[CCode (cname="RCoreFile", cprefix="r_core_file_", free_function="")]
public class File {
//public static bool set(string file, Core.File file);
//public static bool close(string file, Core.File file);