2013-01-22 17:08:33 +00:00
|
|
|
/* radare - LGPL - Copyright 2009-2013 - pancake */
|
2011-10-18 07:38:20 +00:00
|
|
|
|
2009-02-05 21:08:46 +00:00
|
|
|
#ifndef _INCLUDE_R_CORE_H_
|
|
|
|
#define _INCLUDE_R_CORE_H_
|
|
|
|
|
|
|
|
#include "r_types.h"
|
2011-09-09 23:30:03 +00:00
|
|
|
#include "r_magic.h"
|
2009-02-05 21:08:46 +00:00
|
|
|
#include "r_io.h"
|
2011-01-11 23:01:06 +00:00
|
|
|
#include "r_fs.h"
|
2009-02-05 21:08:46 +00:00
|
|
|
#include "r_lib.h"
|
2011-10-04 08:10:00 +00:00
|
|
|
#include "r_egg.h"
|
2009-02-05 21:08:46 +00:00
|
|
|
#include "r_lang.h"
|
2009-02-20 15:29:12 +00:00
|
|
|
#include "r_asm.h"
|
2009-02-24 14:58:21 +00:00
|
|
|
#include "r_parse.h"
|
2009-02-15 23:57:03 +00:00
|
|
|
#include "r_anal.h"
|
2009-02-05 21:08:46 +00:00
|
|
|
#include "r_cmd.h"
|
|
|
|
#include "r_cons.h"
|
|
|
|
#include "r_print.h"
|
2009-02-09 00:54:09 +00:00
|
|
|
#include "r_search.h"
|
2010-04-08 10:29:47 +00:00
|
|
|
#include "r_sign.h"
|
2009-02-05 21:08:46 +00:00
|
|
|
#include "r_debug.h"
|
|
|
|
#include "r_flags.h"
|
|
|
|
#include "r_config.h"
|
2009-03-08 17:29:21 +00:00
|
|
|
#include "r_bin.h"
|
2011-07-13 15:41:26 +00:00
|
|
|
#include "r_hash.h"
|
2011-03-21 00:47:17 +00:00
|
|
|
#include "r_socket.h"
|
2009-02-05 21:08:46 +00:00
|
|
|
|
2010-02-28 21:58:21 +00:00
|
|
|
#define R_CORE_CMD_EXIT -2
|
2009-02-18 15:20:14 +00:00
|
|
|
#define R_CORE_BLOCKSIZE 64
|
2012-04-21 12:28:53 +00:00
|
|
|
#define R_CORE_BLOCKSIZE_MAX 0x40000 /* 256KB */
|
2009-02-05 21:08:46 +00:00
|
|
|
|
2010-03-19 03:32:42 +00:00
|
|
|
#define R_CORE_ANAL_GRAPHLINES 0x1
|
|
|
|
#define R_CORE_ANAL_GRAPHBODY 0x2
|
2010-05-24 16:35:08 +00:00
|
|
|
#define R_CORE_ANAL_GRAPHDIFF 0x4
|
2013-01-24 02:48:24 +00:00
|
|
|
#define R_CORE_ANAL_JSON 0x8
|
2010-03-19 03:32:42 +00:00
|
|
|
|
2010-08-24 09:58:09 +00:00
|
|
|
/* rtr */
|
|
|
|
#define RTR_PROT_RAP 0
|
|
|
|
#define RTR_PROT_TCP 1
|
|
|
|
#define RTR_PROT_UDP 2
|
2013-02-06 09:35:23 +00:00
|
|
|
#define RTR_PROT_HTTP 3
|
2010-08-24 09:58:09 +00:00
|
|
|
|
|
|
|
#define RTR_RAP_OPEN 0x01
|
|
|
|
#define RTR_RAP_CMD 0x07
|
|
|
|
#define RTR_RAP_REPLY 0x80
|
|
|
|
|
|
|
|
#define RTR_MAX_HOSTS 255
|
|
|
|
|
|
|
|
typedef struct r_core_rtr_host_t {
|
|
|
|
int proto;
|
|
|
|
char host[512];
|
|
|
|
int port;
|
|
|
|
char file[1024];
|
2011-03-21 00:47:17 +00:00
|
|
|
RSocket *fd;
|
2010-08-24 09:58:09 +00:00
|
|
|
} RCoreRtrHost;
|
2012-12-23 12:52:57 +00:00
|
|
|
|
|
|
|
typedef struct r_core_log_t {
|
|
|
|
int first;
|
|
|
|
int last;
|
|
|
|
RStrpool *sp;
|
|
|
|
} RCoreLog;
|
2010-08-24 09:58:09 +00:00
|
|
|
|
2010-01-12 01:12:18 +00:00
|
|
|
typedef struct r_core_file_t {
|
|
|
|
char *uri;
|
|
|
|
char *filename;
|
2009-07-08 11:49:55 +00:00
|
|
|
ut64 seek;
|
|
|
|
ut64 size;
|
2011-02-07 08:46:01 +00:00
|
|
|
RIOMap *map;
|
2009-02-05 21:08:46 +00:00
|
|
|
int rwx;
|
2009-02-18 00:43:57 +00:00
|
|
|
int dbg;
|
2011-02-07 08:46:01 +00:00
|
|
|
RIODesc *fd;
|
2012-08-04 21:48:06 +00:00
|
|
|
RBinObject *obj;
|
2010-01-26 00:28:33 +00:00
|
|
|
} RCoreFile;
|
2009-02-05 21:08:46 +00:00
|
|
|
|
2011-02-15 15:19:18 +00:00
|
|
|
#define R_CORE_ASMSTEPS 128
|
|
|
|
typedef struct r_core_asmsteps_t {
|
|
|
|
ut64 offset;
|
|
|
|
int cols;
|
|
|
|
} RCoreAsmsteps;
|
|
|
|
|
2010-01-12 01:12:18 +00:00
|
|
|
typedef struct r_core_t {
|
2012-09-18 01:39:32 +00:00
|
|
|
RBin *bin;
|
|
|
|
RConfig *config;
|
2010-01-12 01:12:18 +00:00
|
|
|
ut64 offset;
|
2009-07-08 11:49:55 +00:00
|
|
|
ut32 blocksize;
|
2012-04-21 12:28:53 +00:00
|
|
|
ut32 blocksize_max;
|
2009-07-08 11:49:55 +00:00
|
|
|
ut8 *block;
|
2013-02-06 09:35:23 +00:00
|
|
|
ut8 *oobi; /* out of band input ; used for multiline or file input */
|
2010-01-31 13:22:27 +00:00
|
|
|
int ffio;
|
2009-02-05 21:08:46 +00:00
|
|
|
int oobi_len;
|
2012-09-19 12:08:44 +00:00
|
|
|
ut8 *yank_buf;
|
2009-02-18 12:10:59 +00:00
|
|
|
int yank_len;
|
2009-07-08 11:49:55 +00:00
|
|
|
ut64 yank_off;
|
2012-09-19 12:08:44 +00:00
|
|
|
int tmpseek;
|
|
|
|
boolt vmode;
|
2009-03-20 21:05:12 +00:00
|
|
|
int interrupted; // XXX IS THIS DUPPED SOMEWHERE?
|
2009-02-05 21:08:46 +00:00
|
|
|
/* files */
|
2010-04-09 15:13:35 +00:00
|
|
|
RCons *cons;
|
2012-01-31 01:45:17 +00:00
|
|
|
RPair *kv;
|
2010-05-19 22:59:42 +00:00
|
|
|
RIO *io;
|
2010-04-10 23:46:07 +00:00
|
|
|
RCoreFile *file;
|
2011-02-07 08:46:01 +00:00
|
|
|
RList *files;
|
2010-05-19 22:59:42 +00:00
|
|
|
RNum *num;
|
|
|
|
RLib *lib;
|
2012-09-19 12:08:44 +00:00
|
|
|
RCmd *rcmd;
|
2010-05-19 22:59:42 +00:00
|
|
|
RAnal *anal;
|
|
|
|
RAsm *assembler;
|
|
|
|
RAnalRefline *reflines;
|
2010-06-20 22:48:06 +00:00
|
|
|
RAnalRefline *reflines2;
|
2010-05-19 22:59:42 +00:00
|
|
|
RParse *parser;
|
|
|
|
RPrint *print;
|
|
|
|
RLang *lang;
|
|
|
|
RDebug *dbg;
|
|
|
|
RFlag *flags;
|
|
|
|
RSearch *search;
|
2012-11-30 00:06:30 +00:00
|
|
|
RIOSection *section;
|
2010-05-19 22:59:42 +00:00
|
|
|
RSign *sign;
|
2011-01-11 23:01:06 +00:00
|
|
|
RFS *fs;
|
2011-10-04 08:10:00 +00:00
|
|
|
REgg *egg;
|
2012-12-23 12:52:57 +00:00
|
|
|
RCoreLog *log;
|
2010-06-23 15:30:16 +00:00
|
|
|
char *cmdqueue;
|
2011-08-27 18:25:37 +00:00
|
|
|
char *lastcmd;
|
|
|
|
int cmdrepeat;
|
2011-01-26 23:45:16 +00:00
|
|
|
ut64 inc;
|
2010-08-24 09:58:09 +00:00
|
|
|
int rtr_n;
|
|
|
|
RCoreRtrHost rtr_host[RTR_MAX_HOSTS];
|
2011-02-15 15:19:18 +00:00
|
|
|
int curasmstep;
|
|
|
|
RCoreAsmsteps asmsteps[R_CORE_ASMSTEPS];
|
2011-03-03 15:52:51 +00:00
|
|
|
ut64 asmqjmps[10];
|
2011-06-04 01:14:04 +00:00
|
|
|
// visual
|
2013-02-06 09:35:23 +00:00
|
|
|
int http_up;
|
2011-06-04 01:14:04 +00:00
|
|
|
int printidx;
|
2012-12-07 14:44:36 +00:00
|
|
|
RList *watchers;
|
2010-01-26 00:28:33 +00:00
|
|
|
} RCore;
|
2009-02-05 21:08:46 +00:00
|
|
|
|
2012-12-07 14:44:36 +00:00
|
|
|
typedef struct r_core_cmpwatch_t {
|
|
|
|
ut64 addr;
|
|
|
|
int size;
|
|
|
|
char cmd[32];
|
|
|
|
ut8 *odata;
|
|
|
|
ut8 *ndata;
|
|
|
|
} RCoreCmpWatcher;
|
|
|
|
|
2010-11-15 10:06:10 +00:00
|
|
|
typedef int (*RCoreSearchCallback)(RCore *core, ut64 from, ut8 *buf, int len);
|
|
|
|
|
2009-12-24 02:17:53 +00:00
|
|
|
#ifdef R_API
|
2010-04-09 13:57:22 +00:00
|
|
|
#define r_core_cast(x) (RCore*)(size_t)(x)
|
2012-06-12 22:51:16 +00:00
|
|
|
R_API RCons *r_core_get_cons (RCore *core);
|
2012-09-18 01:39:32 +00:00
|
|
|
R_API RBin *r_core_get_bin (RCore *core);
|
2012-06-12 22:51:16 +00:00
|
|
|
R_API RConfig *r_core_get_config (RCore *core);
|
2011-02-24 15:50:29 +00:00
|
|
|
R_API RAsmOp *r_core_disassemble (RCore *core, ut64 addr);
|
2012-07-21 10:11:21 +00:00
|
|
|
R_API int r_core_init(RCore *core);
|
|
|
|
R_API RCore *r_core_new();
|
|
|
|
R_API RCore *r_core_free(RCore *core);
|
2012-08-13 12:14:23 +00:00
|
|
|
R_API RCore *r_core_fini(RCore *c);
|
2012-07-21 10:11:21 +00:00
|
|
|
R_API int r_core_config_init(RCore *core);
|
|
|
|
R_API int r_core_prompt(RCore *core, int sync);
|
|
|
|
R_API int r_core_prompt_exec(RCore *core);
|
|
|
|
R_API void r_core_prompt_loop(RCore *core);
|
|
|
|
R_API int r_core_cmd(RCore *core, const char *cmd, int log);
|
2011-08-27 18:25:37 +00:00
|
|
|
R_API void r_core_cmd_repeat(RCore *core, int next);
|
2011-05-21 12:27:46 +00:00
|
|
|
R_API char *r_core_editor (RCore *core, const char *str);
|
2012-07-21 10:11:21 +00:00
|
|
|
// FIXME: change (void *user) to (RCore *core)
|
2009-04-01 00:28:13 +00:00
|
|
|
R_API int r_core_cmdf(void *user, const char *fmt, ...);
|
2012-06-27 23:27:40 +00:00
|
|
|
R_API int r_core_flush(void *user, const char *cmd);
|
2009-04-01 00:28:13 +00:00
|
|
|
R_API int r_core_cmd0(void *user, const char *cmd);
|
2012-07-21 10:11:21 +00:00
|
|
|
R_API void r_core_cmd_init(RCore *core);
|
2012-09-06 01:12:54 +00:00
|
|
|
R_API int r_core_cmd_pipe(RCore *core, char *radare_cmd, char *shell_cmd);
|
2013-04-10 23:25:25 +00:00
|
|
|
R_API char *r_core_cmd_str(RCore *core, const char *cmd);
|
|
|
|
R_API char *r_core_cmd_strf(RCore *core, const char *fmt, ...);
|
2012-09-06 01:12:54 +00:00
|
|
|
R_API char *r_core_cmd_str_pipe(RCore *core, const char *cmd);
|
2012-07-21 10:11:21 +00:00
|
|
|
R_API int r_core_cmd_file(RCore *core, const char *file);
|
|
|
|
R_API int r_core_cmd_command(RCore *core, const char *command);
|
|
|
|
R_API boolt r_core_seek(RCore *core, ut64 addr, boolt rb);
|
2011-05-21 12:27:46 +00:00
|
|
|
R_API void r_core_seek_previous (RCore *core, const char *type);
|
|
|
|
R_API void r_core_seek_next (RCore *core, const char *type);
|
2012-07-21 10:11:21 +00:00
|
|
|
R_API int r_core_seek_align(RCore *core, ut64 align, int count);
|
2013-03-31 02:34:46 +00:00
|
|
|
R_API int r_core_seek_archbits (RCore *core, ut64 addr);
|
2012-07-21 10:11:21 +00:00
|
|
|
R_API int r_core_block_read(RCore *core, int next);
|
|
|
|
R_API int r_core_block_size(RCore *core, int bsize);
|
|
|
|
R_API int r_core_read_at(RCore *core, ut64 addr, ut8 *buf, int size);
|
|
|
|
R_API int r_core_visual(RCore *core, const char *input);
|
|
|
|
R_API int r_core_visual_cmd(RCore *core, int ch);
|
2013-03-07 12:08:05 +00:00
|
|
|
R_API void r_core_visual_asm(RCore *core, ut64 addr);
|
2009-02-05 21:08:46 +00:00
|
|
|
|
2010-11-15 10:06:10 +00:00
|
|
|
R_API int r_core_search_cb(RCore *core, ut64 from, ut64 to, RCoreSearchCallback cb);
|
2011-02-04 10:30:08 +00:00
|
|
|
R_API int r_core_serve(RCore *core, RIODesc *fd);
|
2012-10-22 08:12:13 +00:00
|
|
|
R_API int r_core_file_reopen(RCore *core, const char *args, int perm);
|
2011-02-07 08:46:01 +00:00
|
|
|
R_API void r_core_file_free(RCoreFile *cf);
|
2012-07-21 10:11:21 +00:00
|
|
|
R_API struct r_core_file_t *r_core_file_open(RCore *core, const char *file, int mode, ut64 loadaddr);
|
|
|
|
R_API struct r_core_file_t *r_core_file_get_fd(RCore *core, int fd);
|
|
|
|
R_API int r_core_file_close(RCore *core, RCoreFile *fh);
|
|
|
|
R_API int r_core_file_close_fd(RCore *core, int fd);
|
|
|
|
R_API int r_core_file_list(RCore *core);
|
|
|
|
R_API int r_core_seek_delta(RCore *core, st64 addr);
|
|
|
|
R_API int r_core_write_at(RCore *core, ut64 addr, const ut8 *buf, int size);
|
|
|
|
R_API int r_core_write_op(RCore *core, const char *arg, char op);
|
|
|
|
|
|
|
|
R_API int r_core_yank(RCore *core, ut64 addr, int len);
|
|
|
|
R_API int r_core_yank_paste(RCore *core, ut64 addr, int len);
|
2012-01-31 01:45:17 +00:00
|
|
|
R_API void r_core_yank_set (RCore *core, const char *str);
|
2012-08-09 10:42:44 +00:00
|
|
|
R_API int r_core_yank_to(RCore *core, const char *arg);
|
2009-04-01 00:28:13 +00:00
|
|
|
|
2012-07-21 10:11:21 +00:00
|
|
|
R_API int r_core_loadlibs(RCore *core);
|
|
|
|
// FIXME: change (void *user) -> (RCore *core)
|
2009-04-02 10:23:32 +00:00
|
|
|
R_API int r_core_cmd_buffer(void *user, const char *buf);
|
|
|
|
R_API int r_core_cmdf(void *user, const char *fmt, ...);
|
|
|
|
R_API int r_core_cmd0(void *user, const char *cmd);
|
2012-07-21 10:11:21 +00:00
|
|
|
R_API char *r_core_cmd_str(RCore *core, const char *cmd);
|
|
|
|
R_API int r_core_cmd_foreach(RCore *core, const char *cmd, char *each);
|
2010-05-21 10:07:40 +00:00
|
|
|
R_API char *r_core_op_str(RCore *core, ut64 addr);
|
|
|
|
R_API RAnalOp *r_core_op_anal(RCore *core, ut64 addr);
|
2010-10-09 11:54:08 +00:00
|
|
|
R_API char *r_core_disassemble_instr(RCore *core, ut64 addr, int l);
|
|
|
|
R_API char *r_core_disassemble_bytes(RCore *core, ut64 addr, int b);
|
2010-02-26 20:00:03 +00:00
|
|
|
|
|
|
|
/* anal.c */
|
2013-01-22 17:08:33 +00:00
|
|
|
R_API void r_core_anal_hint_list (RAnal *a, int mode);
|
2010-06-24 22:21:22 +00:00
|
|
|
R_API int r_core_anal_search(RCore *core, ut64 from, ut64 to, ut64 ref);
|
2012-11-20 02:59:00 +00:00
|
|
|
R_API int r_core_anal_data (RCore *core, ut64 addr, int count, int depth);
|
2010-03-26 10:59:28 +00:00
|
|
|
R_API void r_core_anal_refs(RCore *core, ut64 addr, int gv);
|
2012-07-19 02:54:22 +00:00
|
|
|
R_API int r_core_anal_bb(RCore *core, RAnalFunction *fcn, ut64 at, int head);
|
2012-07-21 10:11:21 +00:00
|
|
|
R_API int r_core_anal_bb_seek(RCore *core, ut64 addr);
|
|
|
|
R_API int r_core_anal_fcn(RCore *core, ut64 at, ut64 from, int reftype, int depth);
|
2010-08-02 10:42:59 +00:00
|
|
|
R_API int r_core_anal_fcn_list(RCore *core, const char *input, int rad);
|
2012-07-21 10:11:21 +00:00
|
|
|
R_API int r_core_anal_graph(RCore *core, ut64 addr, int opts);
|
|
|
|
R_API int r_core_anal_graph_fcn(RCore *core, char *input, int opts);
|
2012-06-14 00:18:15 +00:00
|
|
|
R_API RList* r_core_anal_graph_to(RCore *core, ut64 addr, int n);
|
2012-07-21 10:11:21 +00:00
|
|
|
R_API int r_core_anal_ref_list(RCore *core, int rad);
|
2010-11-27 03:20:19 +00:00
|
|
|
R_API int r_core_anal_all(RCore *core);
|
2010-03-30 22:03:59 +00:00
|
|
|
|
2010-08-12 12:54:24 +00:00
|
|
|
/* asm.c */
|
2010-09-30 17:25:47 +00:00
|
|
|
typedef struct r_core_asm_hit {
|
|
|
|
char *code;
|
2010-10-06 16:04:47 +00:00
|
|
|
int len;
|
2010-09-30 17:25:47 +00:00
|
|
|
ut64 addr;
|
|
|
|
} RCoreAsmHit;
|
|
|
|
|
|
|
|
R_API RCoreAsmHit *r_core_asm_hit_new();
|
|
|
|
R_API RList *r_core_asm_hit_list_new();
|
|
|
|
R_API void r_core_asm_hit_free(void *_hit);
|
2010-08-12 12:54:24 +00:00
|
|
|
R_API char* r_core_asm_search(RCore *core, const char *input, ut64 from, ut64 to);
|
2010-09-30 17:25:47 +00:00
|
|
|
R_API RList *r_core_asm_strsearch(RCore *core, const char *input, ut64 from, ut64 to);
|
2010-10-06 16:04:47 +00:00
|
|
|
R_API RList *r_core_asm_bwdisassemble (RCore *core, ut64 addr, int n, int len);
|
2012-12-03 03:01:55 +00:00
|
|
|
R_API int r_core_print_disasm(RPrint *p, RCore *core, ut64 addr, ut8 *buf, int len, int lines, int invbreak, int nbytes);
|
2012-11-08 08:49:27 +00:00
|
|
|
R_API int r_core_print_disasm_json(RCore *core, ut64 addr, ut8 *buf, int len);
|
2013-01-22 17:08:33 +00:00
|
|
|
R_API int r_core_print_disasm_instructions (RCore *core, int len, int l);
|
2010-08-12 12:54:24 +00:00
|
|
|
|
2012-07-21 10:11:21 +00:00
|
|
|
R_API int r_core_bin_load(RCore *core, const char *file);
|
|
|
|
R_API int r_core_hash_load(RCore *core, const char *file);
|
2011-01-20 22:28:20 +00:00
|
|
|
|
2010-05-28 00:44:51 +00:00
|
|
|
/* gdiff.c */
|
2012-07-21 10:11:21 +00:00
|
|
|
R_API int r_core_gdiff(RCore *core1, RCore *core2);
|
2010-05-28 00:44:51 +00:00
|
|
|
|
2010-03-30 22:03:59 +00:00
|
|
|
R_API int r_core_project_open(RCore *core, const char *file);
|
|
|
|
R_API int r_core_project_save(RCore *core, const char *file);
|
2010-05-24 16:51:01 +00:00
|
|
|
R_API char *r_core_project_info(RCore *core, const char *file);
|
2011-02-04 10:30:08 +00:00
|
|
|
R_API char *r_core_sysenv_begin(RCore *core, const char *cmd);
|
|
|
|
R_API void r_core_sysenv_end(RCore *core, const char *cmd);
|
|
|
|
R_API void r_core_sysenv_help();
|
2010-05-28 00:44:51 +00:00
|
|
|
|
2011-11-12 03:20:22 +00:00
|
|
|
/* bin.c */
|
2011-11-23 01:29:09 +00:00
|
|
|
#define R_CORE_BIN_PRINT 0x000
|
|
|
|
#define R_CORE_BIN_RADARE 0x001
|
|
|
|
#define R_CORE_BIN_SET 0x002
|
2012-11-02 02:35:50 +00:00
|
|
|
#define R_CORE_BIN_SIMPLE 0x004
|
|
|
|
#define R_CORE_BIN_JSON 0x008
|
2011-11-12 03:20:22 +00:00
|
|
|
|
|
|
|
#define R_CORE_BIN_ACC_STRINGS 0x001
|
2012-08-14 00:37:42 +00:00
|
|
|
#define R_CORE_BIN_ACC_INFO 0x002
|
|
|
|
#define R_CORE_BIN_ACC_MAIN 0x004
|
2011-11-12 03:20:22 +00:00
|
|
|
#define R_CORE_BIN_ACC_ENTRIES 0x008
|
|
|
|
#define R_CORE_BIN_ACC_RELOCS 0x010
|
|
|
|
#define R_CORE_BIN_ACC_IMPORTS 0x020
|
|
|
|
#define R_CORE_BIN_ACC_SYMBOLS 0x040
|
|
|
|
#define R_CORE_BIN_ACC_SECTIONS 0x080
|
|
|
|
#define R_CORE_BIN_ACC_FIELDS 0x100
|
2012-08-14 00:37:42 +00:00
|
|
|
#define R_CORE_BIN_ACC_LIBS 0x200
|
2011-11-12 16:15:05 +00:00
|
|
|
#define R_CORE_BIN_ACC_CLASSES 0x400
|
2012-08-14 00:37:42 +00:00
|
|
|
#define R_CORE_BIN_ACC_DWARF 0x800
|
2012-08-23 10:46:55 +00:00
|
|
|
#define R_CORE_BIN_ACC_SIZE 0x1000
|
2012-08-14 00:37:42 +00:00
|
|
|
#define R_CORE_BIN_ACC_ALL 0xFFF
|
2011-11-12 03:20:22 +00:00
|
|
|
|
|
|
|
typedef struct r_core_bin_filter_t {
|
|
|
|
ut64 offset;
|
2012-02-27 01:40:27 +00:00
|
|
|
const char *name;
|
2011-11-12 03:20:22 +00:00
|
|
|
} RCoreBinFilter;
|
|
|
|
|
2011-11-21 23:59:20 +00:00
|
|
|
R_API int r_core_bin_info (RCore *core, int action, int mode, int va, RCoreBinFilter *filter, ut64 offset);
|
2011-11-12 03:20:22 +00:00
|
|
|
|
2010-08-24 09:58:09 +00:00
|
|
|
/* rtr */
|
2012-11-05 01:00:34 +00:00
|
|
|
R_API int r_core_rtr_cmds (RCore *core, const char *port);
|
|
|
|
R_API char *r_core_rtr_cmds_query (RCore *core, const char *host, const char *port, const char *cmd);
|
2010-08-24 09:58:09 +00:00
|
|
|
R_API void r_core_rtr_help(RCore *core);
|
|
|
|
R_API void r_core_rtr_pushout(RCore *core, const char *input);
|
|
|
|
R_API void r_core_rtr_list(RCore *core);
|
|
|
|
R_API void r_core_rtr_add(RCore *core, const char *input);
|
|
|
|
R_API void r_core_rtr_remove(RCore *core, const char *input);
|
|
|
|
R_API void r_core_rtr_session(RCore *core, const char *input);
|
|
|
|
R_API void r_core_rtr_cmd(RCore *core, const char *input);
|
2013-01-24 02:48:24 +00:00
|
|
|
R_API int r_core_rtr_http(RCore *core, int launch, const char *path);
|
2011-06-04 01:14:04 +00:00
|
|
|
|
|
|
|
R_API void r_core_visual_define (RCore *core);
|
2011-07-11 20:52:05 +00:00
|
|
|
R_API void r_core_visual_config (RCore *core);
|
|
|
|
R_API void r_core_visual_mounts (RCore *core);
|
|
|
|
R_API void r_core_visual_anal (RCore *core);
|
|
|
|
R_API void r_core_seek_next (RCore *core, const char *type);
|
2011-06-04 01:14:04 +00:00
|
|
|
R_API void r_core_seek_previous (RCore *core, const char *type);
|
|
|
|
R_API void r_core_visual_define (RCore *core);
|
2011-07-11 20:52:05 +00:00
|
|
|
R_API int r_core_visual_trackflags (RCore *core);
|
2011-11-23 01:29:09 +00:00
|
|
|
R_API int r_core_visual_comments (RCore *core);
|
2011-06-04 01:23:12 +00:00
|
|
|
R_API void r_core_visual_prompt (RCore *core);
|
2011-07-05 23:40:14 +00:00
|
|
|
R_API int r_core_search_preludes(RCore *core);
|
2011-07-06 09:48:16 +00:00
|
|
|
R_API int r_core_search_prelude(RCore *core, ut64 from, ut64 to, const ut8 *buf, int blen, const ut8 *mask, int mlen);
|
2013-02-07 02:09:53 +00:00
|
|
|
R_API void r_core_get_boundaries (RCore *core, const char *mode, ut64 *from, ut64 *to);
|
2011-06-04 01:14:04 +00:00
|
|
|
|
2011-09-09 07:49:55 +00:00
|
|
|
R_API int r_core_patch (RCore *core, const char *patch);
|
|
|
|
|
2011-10-10 23:21:38 +00:00
|
|
|
R_API void r_core_hack_help(RCore *core);
|
|
|
|
R_API int r_core_hack(RCore *core, const char *op);
|
2012-04-21 12:28:53 +00:00
|
|
|
R_API int r_core_dump(RCore *core, const char *file, ut64 addr, ut64 size);
|
2012-07-21 10:11:21 +00:00
|
|
|
R_API void r_core_diff_show(RCore *core, RCore *core2);
|
2011-10-10 23:21:38 +00:00
|
|
|
|
2012-12-07 14:44:36 +00:00
|
|
|
|
|
|
|
/* watchers */
|
2012-12-07 15:00:36 +00:00
|
|
|
R_API void r_core_cmpwatch_free (RCoreCmpWatcher *w);
|
|
|
|
R_API RCoreCmpWatcher *r_core_cmpwatch_get (RCore *core, ut64 addr);
|
2012-12-07 14:44:36 +00:00
|
|
|
R_API int r_core_cmpwatch_add (RCore *core, ut64 addr, int size, const char *cmd);
|
|
|
|
R_API int r_core_cmpwatch_del (RCore *core, ut64 addr);
|
|
|
|
R_API int r_core_cmpwatch_update (RCore *core, ut64 addr);
|
|
|
|
R_API int r_core_cmpwatch_show (RCore *core, ut64 addr, int mode);
|
|
|
|
R_API int r_core_cmpwatch_revert (RCore *core, ut64 addr);
|
|
|
|
|
2012-12-23 12:52:57 +00:00
|
|
|
/* logs */
|
|
|
|
R_API void r_core_log_free(RCoreLog *log);
|
|
|
|
R_API void r_core_log_init (RCoreLog *log);
|
|
|
|
R_API RCoreLog *r_core_log_new ();
|
|
|
|
R_API int r_core_log_list(RCore *core, int n, int count, char fmt);
|
|
|
|
R_API void r_core_log_add(RCore *core, const char *msg);
|
|
|
|
R_API void r_core_log_del(RCore *core, int n);
|
|
|
|
|
2013-02-06 09:35:23 +00:00
|
|
|
/* anal stats */
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
ut32 youarehere;
|
|
|
|
ut32 flags;
|
2013-02-07 02:09:53 +00:00
|
|
|
ut32 comments;
|
|
|
|
ut32 functions;
|
2013-02-06 09:35:23 +00:00
|
|
|
ut32 symbols;
|
2013-02-07 02:09:53 +00:00
|
|
|
ut32 strings;
|
2013-02-06 09:35:23 +00:00
|
|
|
ut32 imports;
|
|
|
|
} RCoreAnalStatsItem;
|
|
|
|
typedef struct {
|
|
|
|
RCoreAnalStatsItem *block;
|
|
|
|
} RCoreAnalStats;
|
|
|
|
|
|
|
|
R_API RCoreAnalStats* r_core_anal_get_stats (RCore *a, ut64 from, ut64 to, ut64 step);
|
|
|
|
R_API void r_core_anal_stats_free (RCoreAnalStats *s);
|
|
|
|
|
2009-12-24 02:17:53 +00:00
|
|
|
#endif
|
2009-03-06 00:00:41 +00:00
|
|
|
|
2009-02-05 21:08:46 +00:00
|
|
|
#endif
|