* Rename {r_*_handle_t, R*Handle} to {r_*_plugin_t, R*Plugin}
This commit is contained in:
parent
c8d637a26a
commit
5c35f6e359
16
ChangeLog
16
ChangeLog
|
@ -1064,7 +1064,7 @@ description:
|
|||
- dp=394 # is used to attach
|
||||
- dp 0 # to list all attachable pids
|
||||
- dp # list current used pid
|
||||
* Added not-yet-implemented threads() callback in RDebugHandle
|
||||
* Added not-yet-implemented threads() callback in RDebugPlugin
|
||||
* Fix r_list_free callback handler
|
||||
* Fix again the 'dr=' command :/
|
||||
* Cleanup the help of 'd?' and 'dm', 'dp'
|
||||
|
@ -1141,7 +1141,7 @@ description:
|
|||
* Lot of syntax cleanup to use the new code convention
|
||||
- Clean r_sign, r_search, r_syscall
|
||||
* Define global R_SYS_ARCH, _OS and _BITS
|
||||
- Handle asm.os and asm.arch to hook r_syscall plugins
|
||||
- Plugin asm.os and asm.arch to hook r_syscall plugins
|
||||
- Display 8 or 16 zeros depending on asm.bits
|
||||
- Added r_str_filter () to filter nonprintable chars
|
||||
|
||||
|
@ -1411,7 +1411,7 @@ description:
|
|||
* Implement native kill as a debugger callback
|
||||
* cmd.visual is now cmd.vprompt
|
||||
* Add r_debug_reg_{get|set}
|
||||
- Handle register name aliases
|
||||
- Plugin register name aliases
|
||||
- Works only with ut64 type
|
||||
* 'dr:eax' is now 'dr?eax'
|
||||
* Lot of random syntax cleanups
|
||||
|
@ -1464,7 +1464,7 @@ date: Sun Feb 28 14:49:26 2010 +0100
|
|||
files: libr/cons/cons.c libr/cons/input.c libr/core/config.c libr/core/visual.c libr/include/r_cons.h
|
||||
description:
|
||||
* Added patch from whats fixing the height in visual
|
||||
- Handles WINCH signal in __UNIX__ to get size
|
||||
- Plugins WINCH signal in __UNIX__ to get size
|
||||
- Some code cleanup
|
||||
|
||||
|
||||
|
@ -3083,7 +3083,7 @@ user: pancake
|
|||
date: Thu Dec 31 01:20:08 2009 +0100
|
||||
files: libr/core/visual.c
|
||||
description:
|
||||
* Handle arrow keys in visual (thx whats)
|
||||
* Plugin arrow keys in visual (thx whats)
|
||||
|
||||
|
||||
changeset: 292:2d67b9c2a1bc
|
||||
|
@ -3310,7 +3310,7 @@ files: TODO libr/core/cmd.c libr/core/file.c libr/core/t/radare2.c libr/de
|
|||
description:
|
||||
* Drop PFX in debug plugin names
|
||||
* Minor cosmetic fixups
|
||||
* Handle binmask==NULL in all _add methods of r_search
|
||||
* Plugin binmask==NULL in all _add methods of r_search
|
||||
- Added empty declarations of reset() and kw_reset()
|
||||
* Various random fixes in some vapis
|
||||
|
||||
|
@ -4588,7 +4588,7 @@ files: libr/debug/Makefile libr/debug/debug.c libr/debug/p/dbg_ptrace.c li
|
|||
description:
|
||||
* Initial work on the register API for r_debug
|
||||
- r_debug_reg and r_debug_regset
|
||||
- Handles dbg->newstate to force register sync
|
||||
- Plugins dbg->newstate to force register sync
|
||||
- Only dbg.reg.read() for x86-32 and 64
|
||||
* Added dummy copy of manpages (from old radare1)
|
||||
|
||||
|
@ -6170,7 +6170,7 @@ description:
|
|||
* Fix a bug in the regexp algorithm that can get into infinite loop
|
||||
* Binmask can now contain non hexpair values
|
||||
* Add '/m' search regexp matches using the new R_SEARCH_REGEXP algorithm
|
||||
- Handle ^C in search loop..needs to use callback method
|
||||
- Plugin ^C in search loop..needs to use callback method
|
||||
* Properly cleanup the flag names
|
||||
* Added asm.bits and asm.os eval vars
|
||||
* Added some random tips for debug in README
|
||||
|
|
|
@ -72,7 +72,7 @@ Control the height of the terminal on serial consoles with eval scr.height
|
|||
Use eval file.id=true and eval file.flag=true in your ~/.radarerc to get symbols, strings, .. when loading
|
||||
Disassemble unsupported architectures with external objdump defined in eval asm.objdump. Use 'pd' command.
|
||||
Emulate the base address of a file with eval file.baddr
|
||||
Dump the class header information with 'javasm -c <file.class>'. Handled by radare if file.id=true
|
||||
Dump the class header information with 'javasm -c <file.class>'. Plugind by radare if file.id=true
|
||||
Use gradare if you prefer simple frontend for gui users
|
||||
Feedback, bug reports, patches, ideas are welcome to the mailing list at radare.nopcode.org
|
||||
Bindiff two files with '$ bdiff /bin/true /bin/false'
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <r_list.h>
|
||||
#include "../config.h"
|
||||
|
||||
static RAnalHandle *anal_static_plugins[] =
|
||||
static RAnalPlugin *anal_static_plugins[] =
|
||||
{ R_ANAL_STATIC_PLUGINS };
|
||||
|
||||
static RAnalVarType anal_default_vartypes[] =
|
||||
|
@ -59,7 +59,7 @@ R_API void r_anal_set_user_ptr(RAnal *anal, void *user) {
|
|||
anal->user = user;
|
||||
}
|
||||
|
||||
R_API int r_anal_add(RAnal *anal, RAnalHandle *foo) {
|
||||
R_API int r_anal_add(RAnal *anal, RAnalPlugin *foo) {
|
||||
if (foo->init)
|
||||
foo->init(anal->user);
|
||||
list_add_tail(&(foo->list), &(anal->anals));
|
||||
|
@ -70,7 +70,7 @@ R_API int r_anal_add(RAnal *anal, RAnalHandle *foo) {
|
|||
R_API int r_anal_list(RAnal *anal) {
|
||||
struct list_head *pos;
|
||||
list_for_each_prev(pos, &anal->anals) {
|
||||
RAnalHandle *h = list_entry(pos, RAnalHandle, list);
|
||||
RAnalPlugin *h = list_entry(pos, RAnalPlugin, list);
|
||||
printf (" %s: %s\n", h->name, h->desc);
|
||||
}
|
||||
return R_FALSE;
|
||||
|
@ -79,7 +79,7 @@ R_API int r_anal_list(RAnal *anal) {
|
|||
R_API int r_anal_use(RAnal *anal, const char *name) {
|
||||
struct list_head *pos;
|
||||
list_for_each_prev (pos, &anal->anals) {
|
||||
RAnalHandle *h = list_entry(pos, RAnalHandle, list);
|
||||
RAnalPlugin *h = list_entry(pos, RAnalPlugin, list);
|
||||
if (!strcmp (h->name, name)) {
|
||||
anal->cur = h;
|
||||
return R_TRUE;
|
||||
|
|
|
@ -160,7 +160,7 @@ static int aop(RAnal *anal, RAnalOp *aop, ut64 addr, const ut8 *data, int len) {
|
|||
return (arm_mode==16)?2:4;
|
||||
}
|
||||
|
||||
struct r_anal_handle_t r_anal_plugin_arm = {
|
||||
struct r_anal_plugin_t r_anal_plugin_arm = {
|
||||
.name = "arm",
|
||||
.desc = "ARM code analysis plugin",
|
||||
.init = NULL,
|
||||
|
|
|
@ -222,7 +222,7 @@ static int aop(RAnal *anal, RAnalOp *aop, ut64 addr, const ut8 *bytes, int len)
|
|||
return aop->length;
|
||||
}
|
||||
|
||||
struct r_anal_handle_t r_anal_plugin_csr = {
|
||||
struct r_anal_plugin_t r_anal_plugin_csr = {
|
||||
.name = "csr",
|
||||
.desc = "CSR code analysis plugin",
|
||||
.init = NULL,
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <r_lib.h>
|
||||
#include <r_anal.h>
|
||||
|
||||
struct r_anal_handle_t r_anal_plugin_dummy = {
|
||||
struct r_anal_plugin_t r_anal_plugin_dummy = {
|
||||
.name = "dummy",
|
||||
.desc = "Dummy analysis plugin",
|
||||
.init = NULL,
|
||||
|
|
|
@ -173,7 +173,7 @@ static int aop(RAnal *anal, RAnalOp *aop, ut64 addr, const ut8 *data, int len) {
|
|||
return sz;
|
||||
}
|
||||
|
||||
struct r_anal_handle_t r_anal_plugin_java = {
|
||||
struct r_anal_plugin_t r_anal_plugin_java = {
|
||||
.name = "java",
|
||||
.desc = "Java bytecode analysis plugin",
|
||||
.init = NULL,
|
||||
|
|
|
@ -74,7 +74,7 @@ int aop(RAnal *anal, RAnalOp *aop, ut64 addr, const ut8 *bytes, int len) {
|
|||
return aop->length;
|
||||
}
|
||||
|
||||
struct r_anal_handle_t r_anal_plugin_ppc = {
|
||||
struct r_anal_plugin_t r_anal_plugin_ppc = {
|
||||
.name = "ppc",
|
||||
.desc = "PowerPC analysis plugin",
|
||||
.init = NULL,
|
||||
|
|
|
@ -405,7 +405,7 @@ static int aop(RAnal *anal, RAnalOp *aop, ut64 addr, const ut8 *data, int len) {
|
|||
return aop->length;
|
||||
}
|
||||
|
||||
struct r_anal_handle_t r_anal_plugin_x86 = {
|
||||
struct r_anal_plugin_t r_anal_plugin_x86 = {
|
||||
.name = "x86",
|
||||
.desc = "X86 analysis plugin",
|
||||
.init = NULL,
|
||||
|
|
|
@ -186,7 +186,7 @@ static int aop(RAnal *anal, RAnalOp *aop, ut64 addr, const ut8 *data, int len) {
|
|||
return aop->length;
|
||||
}
|
||||
|
||||
struct r_anal_handle_t r_anal_plugin_x86_x86im = {
|
||||
struct r_anal_plugin_t r_anal_plugin_x86_x86im = {
|
||||
.name = "x86_x86im",
|
||||
.desc = "X86 x86im analysis plugin",
|
||||
.init = NULL,
|
||||
|
|
|
@ -4544,13 +4544,13 @@ const char *bfd_errmsg (bfd_error_type error_tag);
|
|||
|
||||
void bfd_perror (const char *message);
|
||||
|
||||
typedef void (*bfd_error_handler_type) (const char *, ...);
|
||||
typedef void (*bfd_error_plugin_type) (const char *, ...);
|
||||
|
||||
bfd_error_handler_type bfd_set_error_handler (bfd_error_handler_type);
|
||||
bfd_error_plugin_type bfd_set_error_handler (bfd_error_plugin_type);
|
||||
|
||||
void bfd_set_error_program_name (const char *);
|
||||
|
||||
bfd_error_handler_type bfd_get_error_handler (void);
|
||||
bfd_error_plugin_type bfd_get_error_handler (void);
|
||||
|
||||
long bfd_get_reloc_upper_bound (bfd *abfd, asection *sect);
|
||||
|
||||
|
|
|
@ -1060,7 +1060,7 @@ struct elf_backend_data
|
|||
bfd_boolean (*is_function_type) (unsigned int type);
|
||||
|
||||
/* Used to handle bad SHF_LINK_ORDER input. */
|
||||
bfd_error_handler_type link_order_error_handler;
|
||||
bfd_error_plugin_type link_order_error_handler;
|
||||
|
||||
/* Name of the PLT relocation section. */
|
||||
const char *relplt_name;
|
||||
|
|
|
@ -1363,7 +1363,7 @@ print_insn_mips (bfd_vma memaddr,
|
|||
}
|
||||
}
|
||||
|
||||
/* Handle undefined instructions. */
|
||||
/* Plugin undefined instructions. */
|
||||
info->insn_type = dis_noninsn;
|
||||
(*info->fprintf_func) (info->stream, "0x%lx", word);
|
||||
return INSNLEN;
|
||||
|
@ -1907,7 +1907,7 @@ print_insn_mips16 (bfd_vma memaddr, struct disassemble_info *info)
|
|||
else
|
||||
insn = bfd_getl16 (buffer);
|
||||
|
||||
/* Handle the extend opcode specially. */
|
||||
/* Plugin the extend opcode specially. */
|
||||
use_extend = FALSE;
|
||||
if ((insn & 0xf800) == 0xf000)
|
||||
{
|
||||
|
|
|
@ -1864,7 +1864,7 @@ lookup_value (const arg *table, int value)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/* Handle ASI's. */
|
||||
/* Plugin ASI's. */
|
||||
|
||||
static arg asi_table[] =
|
||||
{
|
||||
|
@ -1922,7 +1922,7 @@ sparc_decode_asi (int value)
|
|||
return lookup_value (asi_table, value);
|
||||
}
|
||||
|
||||
/* Handle membar masks. */
|
||||
/* Plugin membar masks. */
|
||||
|
||||
static arg membar_table[] =
|
||||
{
|
||||
|
@ -1952,7 +1952,7 @@ sparc_decode_membar (int value)
|
|||
return lookup_value (membar_table, value);
|
||||
}
|
||||
|
||||
/* Handle prefetch args. */
|
||||
/* Plugin prefetch args. */
|
||||
|
||||
static arg prefetch_table[] =
|
||||
{
|
||||
|
@ -1981,7 +1981,7 @@ sparc_decode_prefetch (int value)
|
|||
return lookup_value (prefetch_table, value);
|
||||
}
|
||||
|
||||
/* Handle sparclet coprocessor registers. */
|
||||
/* Plugin sparclet coprocessor registers. */
|
||||
|
||||
static arg sparclet_cpreg_table[] =
|
||||
{
|
||||
|
|
|
@ -1168,7 +1168,7 @@ unsigned int ud_decode( struct ud* u )
|
|||
; /* error */
|
||||
}
|
||||
|
||||
/* Handle decode error. */
|
||||
/* Plugin decode error. */
|
||||
if ( u->error ) {
|
||||
/* clear out the decode data. */
|
||||
clear_insn( u );
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <list.h>
|
||||
#include "../config.h"
|
||||
|
||||
static RAsmHandler *asm_static_plugins[] =
|
||||
static RAsmPlugin *asm_static_plugins[] =
|
||||
{ R_ASM_STATIC_PLUGINS };
|
||||
|
||||
static int r_asm_pseudo_string(struct r_asm_aop_t *aop, char *input) {
|
||||
|
@ -81,9 +81,9 @@ R_API void r_asm_set_user_ptr(RAsm *a, void *user) {
|
|||
a->user = user;
|
||||
}
|
||||
|
||||
R_API int r_asm_add(RAsm *a, RAsmHandler *foo) {
|
||||
R_API int r_asm_add(RAsm *a, RAsmPlugin *foo) {
|
||||
RListIter *iter;
|
||||
RAsmHandler *h;
|
||||
RAsmPlugin *h;
|
||||
// TODO: cache foo->name length and use memcmp instead of strcmp
|
||||
if (foo->init)
|
||||
foo->init (a->user);
|
||||
|
@ -101,7 +101,7 @@ R_API int r_asm_del(RAsm *a, const char *name) {
|
|||
|
||||
// TODO: this can be optimized using r_str_hash()
|
||||
R_API int r_asm_use(RAsm *a, const char *name) {
|
||||
RAsmHandler *h;
|
||||
RAsmPlugin *h;
|
||||
RListIter *iter;
|
||||
r_list_foreach (a->handlers, iter, h)
|
||||
if (!strcmp (h->name, name)) {
|
||||
|
@ -118,7 +118,7 @@ R_API int r_asm_set_subarch(RAsm *a, const char *name) {
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int has_bits(RAsmHandler *h, int bits) {
|
||||
static int has_bits(RAsmPlugin *h, int bits) {
|
||||
int i;
|
||||
if (h && h->bits)
|
||||
for(i=0; h->bits[i]; i++)
|
||||
|
@ -169,7 +169,7 @@ R_API int r_asm_disassemble(RAsm *a, struct r_asm_aop_t *aop, ut8 *buf, ut64 len
|
|||
|
||||
R_API int r_asm_assemble(RAsm *a, struct r_asm_aop_t *aop, const char *buf) {
|
||||
int ret = 0;
|
||||
RAsmHandler *h;
|
||||
RAsmPlugin *h;
|
||||
RListIter *iter;
|
||||
if (a->cur) {
|
||||
if (!a->cur->assemble) {
|
||||
|
|
|
@ -79,7 +79,7 @@ static int disassemble(struct r_asm_t *a, struct r_asm_aop_t *aop, ut8 *buf, ut6
|
|||
return aop->inst_len;
|
||||
}
|
||||
|
||||
RAsmHandler r_asm_plugin_arm = {
|
||||
RAsmPlugin r_asm_plugin_arm = {
|
||||
.name = "arm",
|
||||
.arch = "arm",
|
||||
.bits = (int[]){ 16, 32, 0 },
|
||||
|
|
|
@ -15,7 +15,7 @@ static int disassemble(RAsm *a, RAsmAop *aop, ut8 *buf, ut64 len) {
|
|||
return aop->inst_len = avrdis (aop->buf_asm, a->pc, buf, len);
|
||||
}
|
||||
|
||||
RAsmHandler r_asm_plugin_avr = {
|
||||
RAsmPlugin r_asm_plugin_avr = {
|
||||
.name = "avr",
|
||||
.arch = "avr",
|
||||
.bits = (int[]){ 16, 32, 0 },
|
||||
|
|
|
@ -62,7 +62,7 @@ static int disassemble(struct r_asm_t *a, struct r_asm_aop_t *aop, ut8 *buf, ut6
|
|||
return i;
|
||||
}
|
||||
|
||||
RAsmHandler r_asm_plugin_bf = {
|
||||
RAsmPlugin r_asm_plugin_bf = {
|
||||
.name = "bf",
|
||||
.arch = "brainfuck",
|
||||
.bits = (int[]){ 8, 0 },
|
||||
|
|
|
@ -13,7 +13,7 @@ static int disassemble(struct r_asm_t *a, struct r_asm_aop_t *aop, ut8 *buf, ut6
|
|||
return (aop->inst_len=2);
|
||||
}
|
||||
|
||||
RAsmHandler r_asm_plugin_csr = {
|
||||
RAsmPlugin r_asm_plugin_csr = {
|
||||
.name = "csr",
|
||||
.arch = "csr",
|
||||
.bits = (int[]){ 16, 0 },
|
||||
|
|
|
@ -12,7 +12,7 @@ static int disassemble(struct r_asm_t *a, struct r_asm_aop_t *aop, ut8 *buf, ut6
|
|||
return R_FALSE;
|
||||
}
|
||||
|
||||
RAsmHandler r_asm_plugin_dummy = {
|
||||
RAsmPlugin r_asm_plugin_dummy = {
|
||||
.name = "dummy",
|
||||
.arch = "none",
|
||||
.bits = (int[]){ 0 },
|
||||
|
|
|
@ -28,7 +28,7 @@ static int assemble(struct r_asm_t *a, struct r_asm_aop_t *aop, const char *buf)
|
|||
return len;
|
||||
}
|
||||
|
||||
RAsmHandler r_asm_plugin_x86_nasm = {
|
||||
RAsmPlugin r_asm_plugin_x86_nasm = {
|
||||
.name = "gas",
|
||||
.desc = "GNU Assembler plugin",
|
||||
.arch = "x86", // XXX
|
||||
|
|
|
@ -17,7 +17,7 @@ static int assemble(struct r_asm_t *a, struct r_asm_aop_t *aop, const char *buf)
|
|||
return aop->inst_len = java_assemble(aop->buf, buf);
|
||||
}
|
||||
|
||||
RAsmHandler r_asm_plugin_java = {
|
||||
RAsmPlugin r_asm_plugin_java = {
|
||||
.name = "java",
|
||||
.desc = "Java CLASS assembler/disassembler",
|
||||
.arch = "java",
|
||||
|
|
|
@ -86,7 +86,7 @@ static int disassemble(struct r_asm_t *a, struct r_asm_aop_t *aop, ut8 *buf, ut6
|
|||
return aop->inst_len;
|
||||
}
|
||||
|
||||
RAsmHandler r_asm_plugin_mips = {
|
||||
RAsmPlugin r_asm_plugin_mips = {
|
||||
.name = "mips",
|
||||
.arch = "mips",
|
||||
.bits = (int[]){ 32, 0 },
|
||||
|
|
|
@ -82,7 +82,7 @@ static int disassemble(struct r_asm_t *a, struct r_asm_aop_t *aop, ut8 *buf, ut6
|
|||
return aop->inst_len;
|
||||
}
|
||||
|
||||
RAsmHandler r_asm_plugin_ppc = {
|
||||
RAsmPlugin r_asm_plugin_ppc = {
|
||||
.name = "ppc",
|
||||
.arch = "ppc",
|
||||
.bits = (int[]){ 32, 0 },
|
||||
|
|
|
@ -18,7 +18,7 @@ static int assemble(struct r_asm_t *a, struct r_asm_aop_t *aop, const char *buf)
|
|||
return aop->inst_len;
|
||||
}
|
||||
|
||||
RAsmHandler r_asm_plugin_psosvm = {
|
||||
RAsmPlugin r_asm_plugin_psosvm = {
|
||||
.name = "psosvm",
|
||||
.desc = "PSOS-VM disassembly plugin",
|
||||
.arch = "psosvm",
|
||||
|
|
|
@ -85,7 +85,7 @@ static int disassemble(struct r_asm_t *a, struct r_asm_aop_t *aop, ut8 *buf, ut6
|
|||
return aop->inst_len;
|
||||
}
|
||||
|
||||
RAsmHandler r_asm_plugin_sparc = {
|
||||
RAsmPlugin r_asm_plugin_sparc = {
|
||||
.name = "sparc",
|
||||
.arch = "sparc",
|
||||
.bits = (int[]){ 32, 0 },
|
||||
|
|
|
@ -61,7 +61,7 @@ static int disassemble(RAsm *a, RAsmAop *aop, ut8 *buf, ut64 len) {
|
|||
return aop->inst_len;
|
||||
}
|
||||
|
||||
RAsmHandler r_asm_plugin_x86 = {
|
||||
RAsmPlugin r_asm_plugin_x86 = {
|
||||
.name = "x86",
|
||||
.desc = "udis86 disassembly plugin",
|
||||
.arch = "x86",
|
||||
|
|
|
@ -32,7 +32,7 @@ static int assemble(RAsm *a, RAsmAop *aop, const char *buf) {
|
|||
return len;
|
||||
}
|
||||
|
||||
RAsmHandler r_asm_plugin_x86_nasm = {
|
||||
RAsmPlugin r_asm_plugin_x86_nasm = {
|
||||
.name = "x86.nasm",
|
||||
.desc = "X86 nasm assembler plugin",
|
||||
.arch = "x86",
|
||||
|
|
|
@ -46,7 +46,7 @@ static int assemble(struct r_asm_t *a, struct r_asm_aop_t *aop, const char *buf)
|
|||
return aop->inst_len;
|
||||
}
|
||||
|
||||
RAsmHandler r_asm_plugin_x86_olly = {
|
||||
RAsmPlugin r_asm_plugin_x86_olly = {
|
||||
.name = "x86.olly",
|
||||
.desc = "X86 disassembly plugin (olly engine)",
|
||||
.arch = "x86",
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include "r_asm.h"
|
||||
|
||||
static void r_asm_list(RAsm *a) {
|
||||
RAsmHandler *h;
|
||||
RAsmPlugin *h;
|
||||
RListIter *iter;
|
||||
r_list_foreach (a->handlers, iter, h)
|
||||
printf ("asm %s\t %s\n", h->name, h->desc);
|
||||
|
|
|
@ -15,7 +15,7 @@ static int coutput = R_FALSE;
|
|||
|
||||
// TODO: remove or gtfo
|
||||
static void r_asm_list(RAsm *a) {
|
||||
RAsmHandler *h;
|
||||
RAsmPlugin *h;
|
||||
RListIter *iter;
|
||||
r_list_foreach (a->handlers, iter, h)
|
||||
printf ("asm %s\t %s\n", h->name, h->desc);
|
||||
|
@ -126,7 +126,7 @@ static int rasm_asm(char *buf, ut64 offset, ut64 len, int bin) {
|
|||
/* asm callback */
|
||||
static int __lib_asm_cb(struct r_lib_plugin_t *pl, void *user, void *data)
|
||||
{
|
||||
RAsmHandle *hand = (struct r_asm_handle_t *)data;
|
||||
RAsmPlugin *hand = (struct r_asm_plugin_t *)data;
|
||||
r_asm_add (a, hand);
|
||||
return R_TRUE;
|
||||
}
|
||||
|
|
|
@ -13,16 +13,16 @@
|
|||
#include "../config.h"
|
||||
|
||||
/* plugin pointers */
|
||||
extern RBinHandler r_bin_plugin_elf;
|
||||
extern RBinHandler r_bin_plugin_elf64;
|
||||
extern RBinHandler r_bin_plugin_pe;
|
||||
extern RBinHandler r_bin_plugin_pe64;
|
||||
extern RBinHandler r_bin_plugin_mach0;
|
||||
extern RBinHandler r_bin_plugin_mach064;
|
||||
extern RBinHandler r_bin_plugin_java;
|
||||
extern RBinHandler r_bin_plugin_dummy;
|
||||
extern RBinPlugin r_bin_plugin_elf;
|
||||
extern RBinPlugin r_bin_plugin_elf64;
|
||||
extern RBinPlugin r_bin_plugin_pe;
|
||||
extern RBinPlugin r_bin_plugin_pe64;
|
||||
extern RBinPlugin r_bin_plugin_mach0;
|
||||
extern RBinPlugin r_bin_plugin_mach064;
|
||||
extern RBinPlugin r_bin_plugin_java;
|
||||
extern RBinPlugin r_bin_plugin_dummy;
|
||||
|
||||
static RBinHandler *bin_static_plugins[] = { R_BIN_STATIC_PLUGINS };
|
||||
static RBinPlugin *bin_static_plugins[] = { R_BIN_STATIC_PLUGINS };
|
||||
|
||||
static RList* get_strings(RBin *bin, int min) {
|
||||
RList *ret;
|
||||
|
@ -104,12 +104,12 @@ static void r_bin_free_items(RBin *bin) {
|
|||
r_list_free (bin->symbols);
|
||||
}
|
||||
|
||||
R_API int r_bin_add(RBin *bin, RBinHandler *foo) {
|
||||
R_API int r_bin_add(RBin *bin, RBinPlugin *foo) {
|
||||
struct list_head *pos;
|
||||
if (foo->init)
|
||||
foo->init (bin->user);
|
||||
list_for_each_prev (pos, &bin->bins) {
|
||||
RBinHandler *h = list_entry (pos, RBinHandler, list);
|
||||
RBinPlugin *h = list_entry (pos, RBinPlugin, list);
|
||||
if (!strcmp (h->name, foo->name))
|
||||
return R_FALSE;
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ R_API int r_bin_list(RBin *bin) {
|
|||
struct list_head *pos;
|
||||
|
||||
list_for_each_prev(pos, &bin->bins) {
|
||||
RBinHandler *h = list_entry (pos, RBinHandler, list);
|
||||
RBinPlugin *h = list_entry (pos, RBinPlugin, list);
|
||||
printf ("bin %-10s %s\n", h->name, h->desc);
|
||||
}
|
||||
return R_FALSE;
|
||||
|
@ -143,7 +143,7 @@ R_API int r_bin_load(RBin *bin, const char *file, const char *plugin_name) {
|
|||
return R_FALSE;
|
||||
bin->file = r_file_abspath (file);
|
||||
list_for_each (pos, &bin->bins) {
|
||||
RBinHandler *h = list_entry (pos, RBinHandler, list);
|
||||
RBinPlugin *h = list_entry (pos, RBinPlugin, list);
|
||||
if ((plugin_name && !strcmp (h->name, plugin_name)) ||
|
||||
(h->check && h->check (bin)))
|
||||
bin->cur = h;
|
||||
|
|
|
@ -266,7 +266,7 @@ typedef struct {
|
|||
typedef struct {
|
||||
ut32 Attributes;
|
||||
ut32 Name;
|
||||
ut32 ModuleHandle;
|
||||
ut32 ModulePlugin;
|
||||
ut32 DelayImportAddressTable;
|
||||
ut32 DelayImportNameTable;
|
||||
ut32 BoundDelayImportTable;
|
||||
|
|
|
@ -27,7 +27,7 @@ static ut64 baddr(RBin *bin) {
|
|||
return 0LL;
|
||||
}
|
||||
|
||||
struct r_bin_handle_t r_bin_plugin_dummy = {
|
||||
struct r_bin_plugin_t r_bin_plugin_dummy = {
|
||||
.name = "dummy",
|
||||
.desc = "dummy bin plugin",
|
||||
.init = NULL,
|
||||
|
|
|
@ -235,7 +235,7 @@ static int check(RBin *bin) {
|
|||
extern struct r_bin_meta_t r_bin_meta_elf;
|
||||
extern struct r_bin_write_t r_bin_write_elf;
|
||||
|
||||
struct r_bin_handle_t r_bin_plugin_elf = {
|
||||
struct r_bin_plugin_t r_bin_plugin_elf = {
|
||||
.name = "elf",
|
||||
.desc = "ELF format r_bin plugin",
|
||||
.init = NULL,
|
||||
|
|
|
@ -19,7 +19,7 @@ static int check(RBin *bin) {
|
|||
extern struct r_bin_meta_t r_bin_meta_elf64;
|
||||
extern struct r_bin_write_t r_bin_write_elf64;
|
||||
|
||||
struct r_bin_handle_t r_bin_plugin_elf64 = {
|
||||
struct r_bin_plugin_t r_bin_plugin_elf64 = {
|
||||
.name = "elf64",
|
||||
.desc = "elf64 bin plugin",
|
||||
.init = NULL,
|
||||
|
|
|
@ -123,7 +123,7 @@ static int check(RBin *bin) {
|
|||
return ret;
|
||||
}
|
||||
|
||||
struct r_bin_handle_t r_bin_plugin_java = {
|
||||
struct r_bin_plugin_t r_bin_plugin_java = {
|
||||
.name = "java",
|
||||
.desc = "java bin plugin",
|
||||
.init = NULL,
|
||||
|
|
|
@ -194,7 +194,7 @@ static int check(RBin *bin) {
|
|||
return ret;
|
||||
}
|
||||
|
||||
struct r_bin_handle_t r_bin_plugin_mach0 = {
|
||||
struct r_bin_plugin_t r_bin_plugin_mach0 = {
|
||||
.name = "mach0",
|
||||
.desc = "mach0 bin plugin",
|
||||
.init = NULL,
|
||||
|
|
|
@ -16,7 +16,7 @@ static int check(RBin *bin) {
|
|||
return ret;
|
||||
}
|
||||
|
||||
struct r_bin_handle_t r_bin_plugin_mach064 = {
|
||||
struct r_bin_plugin_t r_bin_plugin_mach064 = {
|
||||
.name = "mach064",
|
||||
.desc = "mach064 bin plugin",
|
||||
.init = NULL,
|
||||
|
|
|
@ -213,7 +213,7 @@ static int check(RBin *bin) {
|
|||
return ret;
|
||||
}
|
||||
|
||||
struct r_bin_handle_t r_bin_plugin_pe = {
|
||||
struct r_bin_plugin_t r_bin_plugin_pe = {
|
||||
.name = "pe",
|
||||
.desc = "PE bin plugin",
|
||||
.init = NULL,
|
||||
|
|
|
@ -19,7 +19,7 @@ static int check(RBin *bin) {
|
|||
return ret;
|
||||
}
|
||||
|
||||
struct r_bin_handle_t r_bin_plugin_pe64 = {
|
||||
struct r_bin_plugin_t r_bin_plugin_pe64 = {
|
||||
.name = "pe64",
|
||||
.desc = "PE64 (PE32+) bin plugin",
|
||||
.init = NULL,
|
||||
|
|
|
@ -501,7 +501,7 @@ static int rabin_show_srcline(ut64 at) {
|
|||
|
||||
/* bin callback */
|
||||
static int __lib_bin_cb(struct r_lib_plugin_t *pl, void *user, void *data) {
|
||||
struct r_bin_handle_t *hand = (struct r_bin_handle_t *)data;
|
||||
struct r_bin_plugin_t *hand = (struct r_bin_plugin_t *)data;
|
||||
//printf(" * Added (dis)assembly handler\n");
|
||||
r_bin_add (bin, hand);
|
||||
return R_TRUE;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include <r_bp.h>
|
||||
#include "../config.h"
|
||||
|
||||
static struct r_bp_handle_t *bp_static_plugins[] =
|
||||
static struct r_bp_plugin_t *bp_static_plugins[] =
|
||||
{ R_BP_STATIC_PLUGINS };
|
||||
|
||||
R_API RBreakpoint *r_bp_new() {
|
||||
|
|
|
@ -8,7 +8,7 @@ R_API int r_bp_handle_del(struct r_bp_t *bp, const char *name)
|
|||
return R_FALSE;
|
||||
}
|
||||
|
||||
R_API int r_bp_handle_add(struct r_bp_t *bp, struct r_bp_handle_t *foo)
|
||||
R_API int r_bp_handle_add(struct r_bp_t *bp, struct r_bp_plugin_t *foo)
|
||||
{
|
||||
struct list_head *pos;
|
||||
if (bp == NULL) {
|
||||
|
@ -17,7 +17,7 @@ R_API int r_bp_handle_add(struct r_bp_t *bp, struct r_bp_handle_t *foo)
|
|||
}
|
||||
/* avoid dupped plugins */
|
||||
list_for_each_prev (pos, &bp->bps) {
|
||||
struct r_bp_handle_t *h = list_entry (pos, struct r_bp_handle_t, list);
|
||||
struct r_bp_plugin_t *h = list_entry (pos, struct r_bp_plugin_t, list);
|
||||
if (!strcmp (h->name, foo->name))
|
||||
return R_FALSE;
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ R_API int r_bp_use(struct r_bp_t *bp, const char *name)
|
|||
{
|
||||
struct list_head *pos;
|
||||
list_for_each_prev (pos, &bp->plugins) {
|
||||
struct r_bp_handle_t *h = list_entry(pos, struct r_bp_handle_t, list);
|
||||
struct r_bp_plugin_t *h = list_entry(pos, struct r_bp_plugin_t, list);
|
||||
if (!strcmp (h->name, name)) {
|
||||
bp->cur = h;
|
||||
return R_TRUE;
|
||||
|
@ -41,10 +41,10 @@ R_API int r_bp_use(struct r_bp_t *bp, const char *name)
|
|||
|
||||
// TODO: deprecate
|
||||
R_API void r_bp_handle_list(struct r_bp_t *bp) {
|
||||
struct r_bp_handle_t *b;
|
||||
struct r_bp_plugin_t *b;
|
||||
struct list_head *pos;
|
||||
list_for_each (pos, &bp->plugins) {
|
||||
b = list_entry(pos, struct r_bp_handle_t, list);
|
||||
b = list_entry(pos, struct r_bp_plugin_t, list);
|
||||
printf ("bp %c %s\n",
|
||||
(bp->cur && !strcmp (bp->cur->name, b->name))?'*':'-',
|
||||
b->name);
|
||||
|
|
|
@ -16,7 +16,7 @@ static struct r_bp_arch_t r_bp_plugin_arm_bps[] = {
|
|||
{ 2, 1, (const ut8*)"\xdf\xfe" } // arm-thumb-be
|
||||
};
|
||||
|
||||
struct r_bp_handle_t r_bp_plugin_arm = {
|
||||
struct r_bp_plugin_t r_bp_plugin_arm = {
|
||||
.name = "arm",
|
||||
.arch = "arm",
|
||||
.nbps = 10,
|
||||
|
|
|
@ -8,7 +8,7 @@ static struct r_bp_arch_t r_bp_plugin_mips_bps[] = {
|
|||
{ 4, 1, (const ut8*)"\x0d\x00\x00\x00" }, // big endian
|
||||
};
|
||||
|
||||
struct r_bp_handle_t r_bp_plugin_mips = {
|
||||
struct r_bp_plugin_t r_bp_plugin_mips = {
|
||||
.name = "mips",
|
||||
.arch = "mips",
|
||||
.nbps = 2,
|
||||
|
|
|
@ -9,7 +9,7 @@ static struct r_bp_arch_t r_bp_plugin_ppc_bps[] = {
|
|||
{ 4, 1, (const ut8*)"\x0d\x00\x00\x00" }, // big endian
|
||||
};
|
||||
|
||||
struct r_bp_handle_t r_bp_plugin_ppc = {
|
||||
struct r_bp_plugin_t r_bp_plugin_ppc = {
|
||||
.name = "ppc",
|
||||
.arch = "ppc",
|
||||
.nbps = 2,
|
||||
|
|
|
@ -9,7 +9,7 @@ static struct r_bp_arch_t r_bp_plugin_x86_bps[] = {
|
|||
{ 0, 0, NULL },
|
||||
};
|
||||
|
||||
struct r_bp_handle_t r_bp_plugin_x86 = {
|
||||
struct r_bp_plugin_t r_bp_plugin_x86 = {
|
||||
.name = "x86",
|
||||
.arch = "x86",
|
||||
.nbps = 2,
|
||||
|
|
|
@ -67,11 +67,11 @@ R_API int r_cmd_call(struct r_cmd_t *cmd, const char *input) {
|
|||
struct r_cmd_item_t *c;
|
||||
int ret = -1;
|
||||
RListIter *iter;
|
||||
RCmdHandle *cp;
|
||||
RCmdPlugin *cp;
|
||||
|
||||
iter = r_list_iterator (cmd->plist);
|
||||
while (r_list_iter_next (iter)) {
|
||||
cp = (RCmdHandle*) r_list_iter_get (iter);
|
||||
cp = (RCmdPlugin*) r_list_iter_get (iter);
|
||||
if (cp->call (cmd->data, input))
|
||||
return R_TRUE;
|
||||
}
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
#include <r_list.h>
|
||||
#include <stdio.h>
|
||||
|
||||
static struct r_cmd_handle_t *cmd_static_plugins[] =
|
||||
static struct r_cmd_plugin_t *cmd_static_plugins[] =
|
||||
{ R_CMD_STATIC_PLUGINS };
|
||||
|
||||
R_API int r_cmd_handle_add(struct r_cmd_t *cmd, struct r_cmd_handle_t *plugin) {
|
||||
R_API int r_cmd_handle_add(struct r_cmd_t *cmd, struct r_cmd_plugin_t *plugin) {
|
||||
r_list_append (cmd->plist, plugin);
|
||||
return R_TRUE;
|
||||
}
|
||||
|
@ -28,11 +28,11 @@ R_API int r_cmd_handle_init(struct r_cmd_t *cmd) {
|
|||
|
||||
R_API int r_cmd_handle_check(struct r_cmd_t *cmd, const char *a0) {
|
||||
RListIter *iter;
|
||||
RCmdHandle *cp;
|
||||
RCmdPlugin *cp;
|
||||
|
||||
iter = r_list_iterator (cmd->plist);
|
||||
while (r_list_iter_next (iter)) {
|
||||
cp = (RCmdHandle*) r_list_iter_get (iter);
|
||||
cp = (RCmdPlugin*) r_list_iter_get (iter);
|
||||
if (cp->call (NULL, a0))
|
||||
return R_TRUE;
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ static int call(void *user, const char *cmd) {
|
|||
return R_TRUE;
|
||||
}
|
||||
|
||||
struct r_cmd_handle_t r_cmd_plugin_dummy = {
|
||||
struct r_cmd_plugin_t r_cmd_plugin_dummy = {
|
||||
.name = "dummy",
|
||||
.call = call,
|
||||
};
|
||||
|
|
|
@ -61,10 +61,10 @@ R_API RCons *r_cons_new () {
|
|||
I.term_raw.c_cflag |= CS8;
|
||||
I.term_raw.c_cc[VMIN] = 1; // Solaris stuff hehe
|
||||
#elif __WINDOWS__
|
||||
h = GetStdHandle (STD_INPUT_HANDLE);
|
||||
h = GetStdPlugin (STD_INPUT_HANDLE);
|
||||
GetConsoleMode (h, &I.term_buf);
|
||||
I.term_raw = 0;
|
||||
if (!SetConsoleCtrlHandler ((PHANDLER_ROUTINE)__w32_control, TRUE))
|
||||
if (!SetConsoleCtrlPlugin ((PHANDLER_ROUTINE)__w32_control, TRUE))
|
||||
eprintf ("r_cons: Cannot set control console handler\n");
|
||||
#endif
|
||||
//r_cons_palette_init(NULL);
|
||||
|
@ -108,7 +108,7 @@ R_API void r_cons_gotoxy(int x, int y) {
|
|||
coord.X = x;
|
||||
coord.Y = y;
|
||||
if (!hStdout)
|
||||
hStdout = GetStdHandle (STD_OUTPUT_HANDLE);
|
||||
hStdout = GetStdPlugin (STD_OUTPUT_HANDLE);
|
||||
SetConsoleCursorPosition (hStdout,coord);
|
||||
#else
|
||||
r_cons_printf ("\x1b[%d;%dH", y, x);
|
||||
|
@ -128,7 +128,7 @@ R_API void r_cons_clear() {
|
|||
DWORD dummy;
|
||||
|
||||
if (!hStdout) {
|
||||
hStdout = GetStdHandle (STD_OUTPUT_HANDLE);
|
||||
hStdout = GetStdPlugin (STD_OUTPUT_HANDLE);
|
||||
GetConsoleScreenBufferInfo (hStdout,&csbi);
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ R_API int r_cons_readchar() {
|
|||
BOOL ret;
|
||||
DWORD out;
|
||||
LPDWORD mode;
|
||||
HANDLE h = GetStdHandle (STD_INPUT_HANDLE);
|
||||
HANDLE h = GetStdPlugin (STD_INPUT_HANDLE);
|
||||
GetConsoleMode (h, &mode);
|
||||
SetConsoleMode (h, 0); // RAW
|
||||
ret = ReadConsole (h, buf,1, &out, NULL);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#if __WINDOWS__
|
||||
int r_cons_w32_print(ut8 *ptr)
|
||||
{
|
||||
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||
HANDLE hConsole = GetStdPlugin(STD_OUTPUT_HANDLE);
|
||||
int esc = 0;
|
||||
int bg = 0;
|
||||
ut8 *str = ptr;
|
||||
|
|
|
@ -715,7 +715,7 @@ static int cmd_interpret(void *data, const char *input) {
|
|||
switch (input[0]) {
|
||||
case '\0':
|
||||
/* repeat last command */
|
||||
/* NOTE: Handled in r_core_cmd with ugly strcmp */
|
||||
/* NOTE: Plugind in r_core_cmd with ugly strcmp */
|
||||
break;
|
||||
case ' ':
|
||||
if (!r_core_cmd_file (core, input+1))
|
||||
|
|
|
@ -114,7 +114,7 @@ static int config_asm_bits_callback(void *user, void *data) {
|
|||
RConfigNode *node = (RConfigNode *) data;
|
||||
int ret = r_asm_set_bits (core->assembler, node->i_value);
|
||||
if (ret == R_FALSE) {
|
||||
struct r_asm_handle_t *h = core->assembler->cur;
|
||||
struct r_asm_plugin_t *h = core->assembler->cur;
|
||||
if (h) {
|
||||
eprintf ("Cannot set bits %"PFMT64d" to '%s'\n",
|
||||
node->i_value, h->name);
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
/* io callback */
|
||||
static int __lib_io_cb(struct r_lib_plugin_t *pl, void *user, void *data) {
|
||||
struct r_io_handle_t *hand = (struct r_io_handle_t *)data;
|
||||
struct r_io_plugin_t *hand = (struct r_io_plugin_t *)data;
|
||||
struct r_core_t *core = (struct r_core_t *)user;
|
||||
//printf(" * Added IO handler\n");
|
||||
r_io_handle_add (core->io, hand);
|
||||
|
@ -15,7 +15,7 @@ static int __lib_io_dt(struct r_lib_plugin_t *pl, void *p, void *u) { return R_T
|
|||
|
||||
/* cmd callback */
|
||||
static int __lib_cmd_cb(struct r_lib_plugin_t *pl, void *user, void *data) {
|
||||
struct r_cmd_handle_t *hand = (struct r_cmd_handle_t *)data;
|
||||
struct r_cmd_plugin_t *hand = (struct r_cmd_plugin_t *)data;
|
||||
struct r_core_t *core = (struct r_core_t *)user;
|
||||
//printf(" * Added CMD handler\n");
|
||||
r_cmd_handle_add (core->cmd, hand);
|
||||
|
@ -26,7 +26,7 @@ static int __lib_cmd_dt(struct r_lib_plugin_t *pl, void *p, void *u) { return R_
|
|||
|
||||
/* debug callback */
|
||||
static int __lib_dbg_cb(struct r_lib_plugin_t *pl, void *user, void *data) {
|
||||
struct r_debug_handle_t *hand = (struct r_debug_handle_t *)data;
|
||||
struct r_debug_plugin_t *hand = (struct r_debug_plugin_t *)data;
|
||||
struct r_core_t *core = (struct r_core_t *)user;
|
||||
//printf(" * Added debugger handler\n");
|
||||
r_debug_handle_add (core->dbg, hand);
|
||||
|
@ -38,7 +38,7 @@ static int __lib_dbg_dt(struct r_lib_plugin_t *pl, void *p, void *u) { return R_
|
|||
/* breakpoint callback */
|
||||
static int __lib_bp_cb(struct r_lib_plugin_t *pl, void *user, void *data)
|
||||
{
|
||||
struct r_bp_handle_t *hand = (struct r_bp_handle_t *)data;
|
||||
struct r_bp_plugin_t *hand = (struct r_bp_plugin_t *)data;
|
||||
struct r_core_t *core = (struct r_core_t *)user;
|
||||
//printf(" * Added bpger handler\n");
|
||||
r_bp_handle_add (core->dbg->bp, hand);
|
||||
|
@ -49,7 +49,7 @@ static int __lib_bp_dt(struct r_lib_plugin_t *pl, void *p, void *u) { return R_T
|
|||
|
||||
/* lang callback */
|
||||
static int __lib_lng_cb(struct r_lib_plugin_t *pl, void *user, void *data) {
|
||||
struct r_lang_handle_t *hand = (struct r_lang_handle_t *)data;
|
||||
struct r_lang_plugin_t *hand = (struct r_lang_plugin_t *)data;
|
||||
struct r_core_t *core = (struct r_core_t *)user;
|
||||
//printf(" * Added language handler\n");
|
||||
r_lang_add (core->lang, hand);
|
||||
|
@ -60,7 +60,7 @@ static int __lib_lng_dt(struct r_lib_plugin_t *pl, void *p, void *u) { return R_
|
|||
|
||||
/* anal callback */
|
||||
static int __lib_anl_cb(struct r_lib_plugin_t *pl, void *user, void *data) {
|
||||
struct r_anal_handle_t *hand = (struct r_anal_handle_t *)data;
|
||||
struct r_anal_plugin_t *hand = (struct r_anal_plugin_t *)data;
|
||||
struct r_core_t *core = (struct r_core_t *)user;
|
||||
//printf(" * Added analysis handler\n");
|
||||
r_anal_add (core->anal, hand);
|
||||
|
@ -71,7 +71,7 @@ static int __lib_anl_dt(struct r_lib_plugin_t *pl, void *p, void *u) { return R_
|
|||
|
||||
/* asm callback */
|
||||
static int __lib_asm_cb(struct r_lib_plugin_t *pl, void *user, void *data) {
|
||||
struct r_asm_handle_t *hand = (struct r_asm_handle_t *)data;
|
||||
struct r_asm_plugin_t *hand = (struct r_asm_plugin_t *)data;
|
||||
struct r_core_t *core = (struct r_core_t *)user;
|
||||
//printf(" * Added (dis)assembly handler\n");
|
||||
r_asm_add (core->assembler, hand);
|
||||
|
@ -82,7 +82,7 @@ static int __lib_asm_dt(struct r_lib_plugin_t *pl, void *p, void *u) { return R_
|
|||
|
||||
/* parse callback */
|
||||
static int __lib_parse_cb(struct r_lib_plugin_t *pl, void *user, void *data) {
|
||||
struct r_parse_handle_t *hand = (struct r_parse_handle_t *)data;
|
||||
struct r_parse_plugin_t *hand = (struct r_parse_plugin_t *)data;
|
||||
struct r_core_t *core = (struct r_core_t *)user;
|
||||
//printf(" * Added (dis)assembly handler\n");
|
||||
r_parse_add (core->parser, hand);
|
||||
|
@ -93,7 +93,7 @@ static int __lib_parse_dt(struct r_lib_plugin_t *pl, void *p, void *u) { return
|
|||
|
||||
/* bin callback */
|
||||
static int __lib_bin_cb(struct r_lib_plugin_t *pl, void *user, void *data) {
|
||||
struct r_bin_handle_t *hand = (struct r_bin_handle_t *)data;
|
||||
struct r_bin_plugin_t *hand = (struct r_bin_plugin_t *)data;
|
||||
struct r_core_t *core = (struct r_core_t *)user;
|
||||
//printf(" * Added (dis)assembly handler\n");
|
||||
r_bin_add (core->bin, hand);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
#include "r_crypto.h"
|
||||
#include "../config.h"
|
||||
|
||||
static struct r_crypto_handle_t *crypto_static_plugins[] =
|
||||
static struct r_crypto_plugin_t *crypto_static_plugins[] =
|
||||
{ R_CRYPTO_STATIC_PLUGINS };
|
||||
|
||||
R_API struct r_crypto_t *r_crypto_init(struct r_crypto_t *cry, int hard)
|
||||
|
@ -25,14 +25,14 @@ R_API struct r_crypto_t *r_crypto_init(struct r_crypto_t *cry, int hard)
|
|||
return cry;
|
||||
}
|
||||
|
||||
R_API int r_crypto_add(struct r_crypto_t *cry, struct r_crypto_handle_t *h)
|
||||
R_API int r_crypto_add(struct r_crypto_t *cry, struct r_crypto_plugin_t *h)
|
||||
{
|
||||
// add a check ?
|
||||
list_add_tail(&(h->list), &(cry->handlers));
|
||||
return R_TRUE;
|
||||
}
|
||||
|
||||
R_API int r_crypto_del(struct r_crypto_t *cry, struct r_crypto_handle_t *h)
|
||||
R_API int r_crypto_del(struct r_crypto_t *cry, struct r_crypto_plugin_t *h)
|
||||
{
|
||||
list_del(&(h->list));
|
||||
return R_TRUE;
|
||||
|
@ -70,7 +70,7 @@ R_API int r_crypto_use(struct r_crypto_t *cry, const char *algo)
|
|||
int ret = R_FALSE;
|
||||
struct list_head *pos;
|
||||
list_for_each_prev(pos, &cry->handlers) {
|
||||
struct r_crypto_handle_t *h = list_entry(pos, struct r_crypto_handle_t, list);
|
||||
struct r_crypto_plugin_t *h = list_entry(pos, struct r_crypto_plugin_t, list);
|
||||
if (h->use(algo)) {
|
||||
cry->h = h;
|
||||
cry->key_len = h->get_key_size(cry);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <r_lib.h>
|
||||
#include <r_crypto.h>
|
||||
|
||||
struct r_crypto_handle_t r_crypto_plugin_aes = {
|
||||
struct r_crypto_plugin_t r_crypto_plugin_aes = {
|
||||
.name = "crypto_aes",
|
||||
/* TODO */
|
||||
};
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
#include "../config.h"
|
||||
|
||||
/* plugin pointers */
|
||||
extern RDebugHandle r_debug_plugin_native;
|
||||
extern RDebugHandle r_debug_plugin_gdb;
|
||||
extern RDebugPlugin r_debug_plugin_native;
|
||||
extern RDebugPlugin r_debug_plugin_gdb;
|
||||
|
||||
static RDebugHandle *debug_static_plugins[] =
|
||||
static RDebugPlugin *debug_static_plugins[] =
|
||||
{ R_DEBUG_STATIC_PLUGINS };
|
||||
|
||||
R_API int r_debug_handle_init(RDebug *dbg) {
|
||||
|
@ -22,7 +22,7 @@ R_API int r_debug_handle_init(RDebug *dbg) {
|
|||
R_API int r_debug_use(RDebug *dbg, const char *str) {
|
||||
struct list_head *pos;
|
||||
list_for_each_prev (pos, &dbg->handlers) {
|
||||
RDebugHandle *h = list_entry (pos, RDebugHandle, list);
|
||||
RDebugPlugin *h = list_entry (pos, RDebugPlugin, list);
|
||||
if (!strcmp (str, h->name)) {
|
||||
dbg->h = h;
|
||||
if (h->reg_profile) {
|
||||
|
@ -40,14 +40,14 @@ R_API int r_debug_handle_list(RDebug *dbg) {
|
|||
int count = 0;
|
||||
struct list_head *pos;
|
||||
list_for_each_prev(pos, &dbg->handlers) {
|
||||
RDebugHandle *h = list_entry(pos, RDebugHandle, list);
|
||||
RDebugPlugin *h = list_entry(pos, RDebugPlugin, list);
|
||||
eprintf ("dbg %d %s %s\n", count, h->name, ((h==dbg->h)?"*":""));
|
||||
count++;
|
||||
}
|
||||
return R_FALSE;
|
||||
}
|
||||
|
||||
R_API int r_debug_handle_add(RDebug *dbg, RDebugHandle *foo) {
|
||||
R_API int r_debug_handle_add(RDebug *dbg, RDebugPlugin *foo) {
|
||||
list_add_tail(&(foo->list), &(dbg->handlers));
|
||||
return R_TRUE;
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ static int r_debug_gdb_detach(int pid) {
|
|||
return R_TRUE;
|
||||
}
|
||||
|
||||
struct r_debug_handle_t r_dbg_plugin_gdb = {
|
||||
struct r_debug_plugin_t r_dbg_plugin_gdb = {
|
||||
.name = "gdb",
|
||||
.archs = { "x86", 0 }, //"x86-64", "arm", "powerpc", 0 },
|
||||
.step = &r_debug_gdb_step,
|
||||
|
|
|
@ -863,7 +863,7 @@ static RList *r_debug_native_frames(RDebug *dbg) {
|
|||
list->free = free;
|
||||
bio->read_at (bio->io, _rip, &buf, 4);
|
||||
/* %rbp=old rbp, %rbp+4 points to ret */
|
||||
/* Handle before function prelude: push %rbp ; mov %rsp, %rbp */
|
||||
/* Plugin before function prelude: push %rbp ; mov %rsp, %rbp */
|
||||
if (!memcmp (buf, "\x55\x89\xe5", 3) || !memcmp (buf, "\x89\xe5\x57", 3)) {
|
||||
if (bio->read_at (bio->io, _rsp, &ptr, 4) != 4) {
|
||||
eprintf ("read error at 0x%08"PFMT64x"\n", _rsp);
|
||||
|
@ -923,7 +923,7 @@ static int r_debug_native_init(RDebug *dbg) {
|
|||
#endif
|
||||
}
|
||||
|
||||
struct r_debug_handle_t r_debug_plugin_native = {
|
||||
struct r_debug_plugin_t r_debug_plugin_native = {
|
||||
.name = "native",
|
||||
#if __i386__
|
||||
.bits = R_SYS_BITS_32,
|
||||
|
@ -971,7 +971,7 @@ struct r_lib_struct_t radare_plugin = {
|
|||
|
||||
//#endif
|
||||
#else // DEBUGGER
|
||||
struct r_debug_handle_t r_debug_plugin_native = {
|
||||
struct r_debug_plugin_t r_debug_plugin_native = {
|
||||
.name = "native",
|
||||
};
|
||||
|
||||
|
|
|
@ -90,19 +90,19 @@ static int w32_dbg_init() {
|
|||
HANDLE lib;
|
||||
|
||||
w32_detach = (BOOL WINAPI (*)(DWORD))
|
||||
GetProcAddress (GetModuleHandle ("kernel32"),
|
||||
GetProcAddress (GetModulePlugin ("kernel32"),
|
||||
"DebugActiveProcessStop");
|
||||
w32_openthread = (HANDLE WINAPI (*)(DWORD, BOOL, DWORD))
|
||||
GetProcAddress (GetModuleHandle ("kernel32"), "OpenThread");
|
||||
GetProcAddress (GetModulePlugin ("kernel32"), "OpenThread");
|
||||
w32_dbgbreak = (HANDLE WINAPI (*)(HANDLE))
|
||||
GetProcAddress (GetModuleHandle ("kernel32"),
|
||||
GetProcAddress (GetModulePlugin ("kernel32"),
|
||||
"DebugBreakProcess");
|
||||
// only windows vista :(
|
||||
w32_getthreadid = (DWORD WINAPI (*)(HANDLE))
|
||||
GetProcAddress (GetModuleHandle ("kernel32"), "GetThreadId");
|
||||
GetProcAddress (GetModulePlugin ("kernel32"), "GetThreadId");
|
||||
// from xp1
|
||||
w32_getprocessid = (DWORD WINAPI (*)(HANDLE))
|
||||
GetProcAddress (GetModuleHandle ("kernel32"), "GetProcessId");
|
||||
GetProcAddress (GetModulePlugin ("kernel32"), "GetProcessId");
|
||||
|
||||
lib = LoadLibrary ("psapi.dll");
|
||||
if(lib == NULL) {
|
||||
|
@ -194,7 +194,7 @@ err_load_th:
|
|||
//print_lasterr((char *)__FUNCTION__);
|
||||
|
||||
if (th != INVALID_HANDLE_VALUE)
|
||||
CloseHandle (th);
|
||||
ClosePlugin (th);
|
||||
return ret;
|
||||
#endif
|
||||
return 0;
|
||||
|
|
|
@ -126,7 +126,7 @@ typedef struct r_anal_t {
|
|||
RList *fcns;
|
||||
RList *vartypes;
|
||||
struct r_anal_ctx_t *ctx;
|
||||
struct r_anal_handle_t *cur;
|
||||
struct r_anal_plugin_t *cur;
|
||||
struct list_head anals;
|
||||
} RAnal;
|
||||
|
||||
|
@ -203,7 +203,7 @@ typedef struct r_anal_refline_t {
|
|||
} RAnalRefline;
|
||||
|
||||
//TODO: typedef RAnalOpCallback
|
||||
typedef struct r_anal_handle_t {
|
||||
typedef struct r_anal_plugin_t {
|
||||
char *name;
|
||||
char *desc;
|
||||
int (*init)(void *user);
|
||||
|
@ -212,14 +212,14 @@ typedef struct r_anal_handle_t {
|
|||
int (*aop)(RAnal *a, struct r_anal_aop_t *aop, ut64 addr,
|
||||
const ut8 *data, int len);
|
||||
struct list_head list;
|
||||
} RAnalHandle;
|
||||
} RAnalPlugin;
|
||||
|
||||
#ifdef R_API
|
||||
/* anal.c */
|
||||
R_API RAnal *r_anal_new();
|
||||
R_API RAnal *r_anal_free(RAnal *r);
|
||||
R_API void r_anal_set_user_ptr(RAnal *anal, void *user);
|
||||
R_API int r_anal_add(RAnal *anal, struct r_anal_handle_t *foo);
|
||||
R_API int r_anal_add(RAnal *anal, struct r_anal_plugin_t *foo);
|
||||
R_API int r_anal_list(RAnal *anal);
|
||||
R_API int r_anal_use(RAnal *anal, const char *name);
|
||||
R_API int r_anal_set_bits(RAnal *anal, int bits);
|
||||
|
@ -291,12 +291,12 @@ R_API char* r_anal_reflines_str(struct r_anal_t *anal, struct r_anal_refline_t *
|
|||
R_API int r_anal_reflines_middle(RAnal *anal, RAnalRefline *list, ut64 addr, int len);
|
||||
|
||||
/* plugin pointers */
|
||||
extern RAnalHandle r_anal_plugin_csr;
|
||||
extern RAnalHandle r_anal_plugin_arm;
|
||||
extern RAnalHandle r_anal_plugin_x86;
|
||||
extern RAnalHandle r_anal_plugin_x86_x86im;
|
||||
extern RAnalHandle r_anal_plugin_ppc;
|
||||
extern RAnalHandle r_anal_plugin_java;
|
||||
extern RAnalPlugin r_anal_plugin_csr;
|
||||
extern RAnalPlugin r_anal_plugin_arm;
|
||||
extern RAnalPlugin r_anal_plugin_x86;
|
||||
extern RAnalPlugin r_anal_plugin_x86_x86im;
|
||||
extern RAnalPlugin r_anal_plugin_ppc;
|
||||
extern RAnalPlugin r_anal_plugin_java;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -71,7 +71,7 @@ typedef struct r_asm_t {
|
|||
int syntax;
|
||||
ut64 pc;
|
||||
void *user;
|
||||
struct r_asm_handler_t *cur;
|
||||
struct r_asm_plugin_t *cur;
|
||||
RAsmFastcall *fastcall;
|
||||
RList *handlers;
|
||||
} RAsm;
|
||||
|
@ -79,7 +79,7 @@ typedef struct r_asm_t {
|
|||
typedef int (*RAsmModifyCallback)(RAsm *a, ut8 *buf, int field, ut64 val);
|
||||
|
||||
// TODO: rename to handler?
|
||||
typedef struct r_asm_handler_t {
|
||||
typedef struct r_asm_plugin_t {
|
||||
char *name;
|
||||
char *arch;
|
||||
char *desc;
|
||||
|
@ -93,7 +93,7 @@ typedef struct r_asm_handler_t {
|
|||
RAsmModifyCallback modify;
|
||||
int (*set_subarch)(RAsm *a, const char *buf);
|
||||
struct r_asm_fastcall_t *fastcall[R_ASM_FASTCALL_ARGS];
|
||||
} RAsmHandler;
|
||||
} RAsmPlugin;
|
||||
|
||||
#ifdef R_API
|
||||
/* asm.c */
|
||||
|
@ -104,7 +104,7 @@ R_API void r_asm_free(RAsm *a);
|
|||
R_API void* r_asm_code_free(struct r_asm_code_t *acode);
|
||||
R_API int r_asm_modify(RAsm *a, ut8 *buf, int field, ut64 val);
|
||||
R_API void r_asm_set_user_ptr(RAsm *a, void *user);
|
||||
R_API int r_asm_add(RAsm *a, RAsmHandler *foo);
|
||||
R_API int r_asm_add(RAsm *a, RAsmPlugin *foo);
|
||||
R_API int r_asm_use(RAsm *a, const char *name);
|
||||
R_API int r_asm_set_bits(RAsm *a, int bits);
|
||||
R_API int r_asm_set_big_endian(RAsm *a, int boolean);
|
||||
|
@ -122,20 +122,20 @@ R_API int r_asm_code_set_equ (RAsmCode *code, const char *key, const char *value
|
|||
R_API char *r_asm_code_equ_replace (RAsmCode *code, char *str);
|
||||
|
||||
/* plugin pointers */
|
||||
extern RAsmHandler r_asm_plugin_dummy;
|
||||
extern RAsmHandler r_asm_plugin_bf;
|
||||
extern RAsmHandler r_asm_plugin_java;
|
||||
extern RAsmHandler r_asm_plugin_mips;
|
||||
extern RAsmHandler r_asm_plugin_x86;
|
||||
extern RAsmHandler r_asm_plugin_x86_olly;
|
||||
extern RAsmHandler r_asm_plugin_x86_nasm;
|
||||
extern RAsmHandler r_asm_plugin_arm;
|
||||
extern RAsmHandler r_asm_plugin_csr;
|
||||
extern RAsmHandler r_asm_plugin_m68k;
|
||||
extern RAsmHandler r_asm_plugin_ppc;
|
||||
extern RAsmHandler r_asm_plugin_sparc;
|
||||
extern RAsmHandler r_asm_plugin_psosvm;
|
||||
extern RAsmHandler r_asm_plugin_avr;
|
||||
extern RAsmPlugin r_asm_plugin_dummy;
|
||||
extern RAsmPlugin r_asm_plugin_bf;
|
||||
extern RAsmPlugin r_asm_plugin_java;
|
||||
extern RAsmPlugin r_asm_plugin_mips;
|
||||
extern RAsmPlugin r_asm_plugin_x86;
|
||||
extern RAsmPlugin r_asm_plugin_x86_olly;
|
||||
extern RAsmPlugin r_asm_plugin_x86_nasm;
|
||||
extern RAsmPlugin r_asm_plugin_arm;
|
||||
extern RAsmPlugin r_asm_plugin_csr;
|
||||
extern RAsmPlugin r_asm_plugin_m68k;
|
||||
extern RAsmPlugin r_asm_plugin_ppc;
|
||||
extern RAsmPlugin r_asm_plugin_sparc;
|
||||
extern RAsmPlugin r_asm_plugin_psosvm;
|
||||
extern RAsmPlugin r_asm_plugin_avr;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -36,11 +36,11 @@ typedef struct r_bin_t {
|
|||
RList* libs;
|
||||
RBuffer *buf;
|
||||
void *user;
|
||||
struct r_bin_handle_t *cur;
|
||||
struct r_bin_plugin_t *cur;
|
||||
struct list_head bins;
|
||||
} RBin;
|
||||
|
||||
typedef struct r_bin_handle_t {
|
||||
typedef struct r_bin_plugin_t {
|
||||
char *name;
|
||||
char *desc;
|
||||
int (*init)(void *user);
|
||||
|
@ -60,7 +60,7 @@ typedef struct r_bin_handle_t {
|
|||
struct r_bin_meta_t *meta;
|
||||
struct r_bin_write_t *write;
|
||||
struct list_head list;
|
||||
} RBinHandle;
|
||||
} RBinPlugin;
|
||||
|
||||
typedef struct r_bin_entry_t {
|
||||
ut64 rva;
|
||||
|
@ -138,7 +138,7 @@ typedef struct r_bin_write_t {
|
|||
#ifdef R_API
|
||||
|
||||
/* bin.c */
|
||||
R_API int r_bin_add(RBin *bin, RBinHandle *foo);
|
||||
R_API int r_bin_add(RBin *bin, RBinPlugin *foo);
|
||||
R_API void* r_bin_free(RBin *bin);
|
||||
R_API int r_bin_list(RBin *bin);
|
||||
R_API int r_bin_load(RBin *bin, const char *file, const char *plugin_name);
|
||||
|
|
|
@ -24,14 +24,14 @@ enum {
|
|||
R_BP_TYPE_DELETE,
|
||||
};
|
||||
|
||||
typedef struct r_bp_handle_t {
|
||||
typedef struct r_bp_plugin_t {
|
||||
char *name;
|
||||
char *arch;
|
||||
int type; // R_BP_TYPE_SW
|
||||
int nbps;
|
||||
struct r_bp_arch_t *bps;
|
||||
struct list_head list;
|
||||
} RBreakpointHandler;
|
||||
} RBreakpointPlugin;
|
||||
|
||||
typedef struct r_bp_item_t {
|
||||
ut64 addr;
|
||||
|
@ -59,7 +59,7 @@ typedef struct r_bp_t {
|
|||
RList *traces;
|
||||
RBreakpointCallback breakpoint;
|
||||
struct r_io_bind_t iob; // compile time dependency
|
||||
struct r_bp_handle_t *cur;
|
||||
struct r_bp_plugin_t *cur;
|
||||
struct list_head plugins;
|
||||
struct list_head bps;
|
||||
} RBreakpoint;
|
||||
|
@ -87,7 +87,7 @@ R_API RBreakpoint *r_bp_free(RBreakpoint *bp);
|
|||
|
||||
R_API int r_bp_del(RBreakpoint *bp, ut64 addr);
|
||||
|
||||
R_API int r_bp_handle_add(RBreakpoint *bp, struct r_bp_handle_t *foo);
|
||||
R_API int r_bp_handle_add(RBreakpoint *bp, struct r_bp_plugin_t *foo);
|
||||
R_API int r_bp_use(RBreakpoint *bp, const char *name);
|
||||
R_API int r_bp_handle_del(RBreakpoint *bp, const char *name);
|
||||
R_API void r_bp_handle_list(RBreakpoint *bp);
|
||||
|
@ -123,12 +123,12 @@ R_API void r_bp_traptrace_enable(RBreakpoint *bp, int enable);
|
|||
#endif
|
||||
|
||||
/* plugin pointers */
|
||||
extern struct r_bp_handle_t r_bp_plugin_x86;
|
||||
extern struct r_bp_handle_t r_bp_plugin_arm;
|
||||
extern struct r_bp_plugin_t r_bp_plugin_x86;
|
||||
extern struct r_bp_plugin_t r_bp_plugin_arm;
|
||||
#if 0
|
||||
extern struct r_bp_handle_t r_bp_plugin_powerpc;
|
||||
extern struct r_bp_handle_t r_bp_plugin_mips;
|
||||
extern struct r_bp_handle_t r_bp_plugin_sparc;
|
||||
extern struct r_bp_plugin_t r_bp_plugin_powerpc;
|
||||
extern struct r_bp_plugin_t r_bp_plugin_mips;
|
||||
extern struct r_bp_plugin_t r_bp_plugin_sparc;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -63,10 +63,10 @@ typedef struct r_cmd_t {
|
|||
RList *plist;
|
||||
} RCmd;
|
||||
|
||||
typedef struct r_cmd_handle_t {
|
||||
typedef struct r_cmd_plugin_t {
|
||||
char *name;
|
||||
RCmdCallback call;
|
||||
} RCmdHandle;
|
||||
} RCmdPlugin;
|
||||
|
||||
#ifdef R_API
|
||||
|
||||
|
@ -88,11 +88,11 @@ R_API int r_cmd_call_long(struct r_cmd_t *cmd, const char *input);
|
|||
R_API char **r_cmd_args(struct r_cmd_t *cmd, int *argc);
|
||||
|
||||
R_API int r_cmd_handle_init(struct r_cmd_t *cmd);
|
||||
R_API int r_cmd_handle_add(struct r_cmd_t *cmd, struct r_cmd_handle_t *plugin);
|
||||
R_API int r_cmd_handle_add(struct r_cmd_t *cmd, struct r_cmd_plugin_t *plugin);
|
||||
R_API int r_cmd_handle_check(struct r_cmd_t *cmd, const char *a0);
|
||||
|
||||
/* plugins */
|
||||
extern struct r_cmd_handle_t r_cmd_plugin_dummy;
|
||||
extern struct r_cmd_plugin_t r_cmd_plugin_dummy;
|
||||
|
||||
/* r_cmd_macro */
|
||||
R_API void r_cmd_macro_init(struct r_cmd_macro_t *mac);
|
||||
|
|
|
@ -17,7 +17,7 @@ enum {
|
|||
};
|
||||
|
||||
typedef struct r_crypto_t {
|
||||
struct r_crypto_handle_t* h;
|
||||
struct r_crypto_plugin_t* h;
|
||||
ut8 *key;
|
||||
ut8 *iv;
|
||||
int key_len;
|
||||
|
@ -28,7 +28,7 @@ typedef struct r_crypto_t {
|
|||
struct list_head handlers;
|
||||
} RCrypto;
|
||||
|
||||
typedef struct r_crypto_handle_t {
|
||||
typedef struct r_crypto_plugin_t {
|
||||
const char *name;
|
||||
int (*get_key_size)(struct r_crypto_t* cry);
|
||||
int (*set_iv)(struct r_crypto_t* cry, const ut8 *iv);
|
||||
|
@ -38,12 +38,12 @@ typedef struct r_crypto_handle_t {
|
|||
int (*use)(const char *algo);
|
||||
int (*fini)(struct r_crypto_t *cry);
|
||||
struct list_head list;
|
||||
} RCryptoHandle;
|
||||
} RCryptoPlugin;
|
||||
|
||||
#ifdef R_API
|
||||
R_API struct r_crypto_t *r_crypto_init(struct r_crypto_t *cry, int hard);
|
||||
R_API struct r_crypto_t *r_crypto_as_new(struct r_crypto_t *cry);
|
||||
R_API int r_crypto_add(struct r_crypto_t *cry, struct r_crypto_handle_t *h);
|
||||
R_API int r_crypto_add(struct r_crypto_t *cry, struct r_crypto_plugin_t *h);
|
||||
R_API struct r_crypto_t *r_crypto_new();
|
||||
R_API struct r_crypto_t *r_crypto_free(struct r_crypto_t *cry);
|
||||
R_API int r_crypto_use(struct r_crypto_t *cry, const char *algo);
|
||||
|
@ -57,6 +57,6 @@ R_API ut8 *r_crypto_get_output(struct r_crypto_t *cry);
|
|||
#endif
|
||||
|
||||
/* plugin pointers */
|
||||
extern struct r_crypto_handle_t r_crypto_plugin_aes;
|
||||
extern struct r_crypto_plugin_t r_crypto_plugin_aes;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -67,7 +67,7 @@ typedef struct r_debug_t {
|
|||
void *user;
|
||||
/* io */
|
||||
void (*printf)(const char *str, ...);
|
||||
struct r_debug_handle_t *h;
|
||||
struct r_debug_plugin_t *h;
|
||||
struct list_head handlers;
|
||||
RAnal *anal;
|
||||
RIOBind iob;
|
||||
|
@ -81,7 +81,7 @@ typedef struct r_debug_t {
|
|||
} RDebug;
|
||||
|
||||
/* TODO: pass dbg and user data pointer everywhere */
|
||||
typedef struct r_debug_handle_t {
|
||||
typedef struct r_debug_plugin_t {
|
||||
const char *name;
|
||||
const char **archs; // MUST BE DEPREACTED!!!!
|
||||
ut32 bits;
|
||||
|
@ -112,7 +112,7 @@ typedef struct r_debug_handle_t {
|
|||
int (*map_dealloc)(RDebug *dbg, ut64 addr);
|
||||
int (*init)(RDebug *dbg);
|
||||
struct list_head list;
|
||||
} RDebugHandle;
|
||||
} RDebugPlugin;
|
||||
|
||||
// TODO: rename to r_debug_process_t ? maybe a thread too ?
|
||||
typedef struct r_debug_pid_t {
|
||||
|
@ -146,7 +146,7 @@ R_API int r_debug_pid_list(struct r_debug_t *dbg, int pid);
|
|||
R_API RDebugPid *r_debug_pid_new(char *path, int pid, char status);
|
||||
|
||||
R_API int r_debug_use(struct r_debug_t *dbg, const char *str);
|
||||
R_API int r_debug_handle_add(struct r_debug_t *dbg, struct r_debug_handle_t *foo);
|
||||
R_API int r_debug_handle_add(struct r_debug_t *dbg, struct r_debug_plugin_t *foo);
|
||||
R_API int r_debug_handle_init(struct r_debug_t *dbg);
|
||||
R_API int r_debug_handle_list(struct r_debug_t *dbg);
|
||||
|
||||
|
@ -165,7 +165,7 @@ R_API int r_debug_select(struct r_debug_t *dbg, int pid, int tid);
|
|||
R_API int r_debug_handle_init(struct r_debug_t *dbg);
|
||||
R_API int r_debug_handle_set(struct r_debug_t *dbg, const char *str);
|
||||
R_API int r_debug_handle_list(struct r_debug_t *dbg);
|
||||
R_API int r_debug_handle_add(struct r_debug_t *dbg, struct r_debug_handle_t *foo);
|
||||
R_API int r_debug_handle_add(struct r_debug_t *dbg, struct r_debug_plugin_t *foo);
|
||||
|
||||
/* memory */
|
||||
R_API int r_debug_map_alloc(RDebug *dbg, RDebugMap *map);
|
||||
|
|
|
@ -63,7 +63,7 @@ typedef struct r_io_t {
|
|||
int write_mask_fd;
|
||||
ut8 *write_mask_buf;
|
||||
int write_mask_len;
|
||||
struct r_io_handle_t *plugin;
|
||||
struct r_io_plugin_t *plugin;
|
||||
struct r_io_undo_t undo;
|
||||
struct list_head io_list;
|
||||
struct list_head sections;
|
||||
|
@ -77,7 +77,7 @@ typedef struct r_io_t {
|
|||
// ... store io changes here
|
||||
//};
|
||||
|
||||
typedef struct r_io_handle_t {
|
||||
typedef struct r_io_plugin_t {
|
||||
void *handle;
|
||||
char *name;
|
||||
char *desc;
|
||||
|
@ -95,10 +95,10 @@ typedef struct r_io_handle_t {
|
|||
int (*handle_open)(RIO *io, const char *);
|
||||
//int (*handle_fd)(RIO *, int);
|
||||
int fds[R_IO_NFDS];
|
||||
} RIOHandle;
|
||||
} RIOPlugin;
|
||||
|
||||
typedef struct r_io_list_t {
|
||||
struct r_io_handle_t *plugin;
|
||||
struct r_io_plugin_t *plugin;
|
||||
struct list_head list;
|
||||
} RIOList;
|
||||
|
||||
|
@ -139,7 +139,7 @@ typedef struct r_io_desc_t {
|
|||
int fd;
|
||||
int flags;
|
||||
char name[4096];
|
||||
struct r_io_handle_t *handle;
|
||||
struct r_io_plugin_t *handle;
|
||||
struct list_head list;
|
||||
} RIODesc;
|
||||
|
||||
|
@ -150,14 +150,14 @@ typedef struct r_io_desc_t {
|
|||
R_API RIO *r_io_new();
|
||||
R_API RIO *r_io_free(RIO *io);
|
||||
R_API int r_io_handle_init(RIO *io);
|
||||
R_API int r_io_handle_open(RIO *io, int fd, struct r_io_handle_t *plugin);
|
||||
R_API int r_io_handle_close(RIO *io, int fd, struct r_io_handle_t *plugin);
|
||||
R_API int r_io_handle_open(RIO *io, int fd, struct r_io_plugin_t *plugin);
|
||||
R_API int r_io_handle_close(RIO *io, int fd, struct r_io_plugin_t *plugin);
|
||||
R_API int r_io_handle_generate(RIO *io);
|
||||
R_API int r_io_handle_add(RIO *io, struct r_io_handle_t *plugin);
|
||||
R_API int r_io_handle_add(RIO *io, struct r_io_plugin_t *plugin);
|
||||
R_API int r_io_handle_list(RIO *io);
|
||||
// TODO: _del ??
|
||||
R_API struct r_io_handle_t *r_io_handle_resolve(RIO *io, const char *filename);
|
||||
R_API struct r_io_handle_t *r_io_handle_resolve_fd(RIO *io, int fd);
|
||||
R_API struct r_io_plugin_t *r_io_handle_resolve(RIO *io, const char *filename);
|
||||
R_API struct r_io_plugin_t *r_io_handle_resolve_fd(RIO *io, int fd);
|
||||
|
||||
/* io/io.c */
|
||||
R_API int r_io_set_write_mask(RIO *io, const ut8 *buf, int len);
|
||||
|
@ -237,20 +237,20 @@ R_API int r_io_wundo_set(RIO *io, int n, int set);
|
|||
|
||||
/* io/desc.c */
|
||||
R_API int r_io_desc_init(RIO *io);
|
||||
R_API int r_io_desc_add(RIO *io, int fd, const char *file, int flags, struct r_io_handle_t *handle);
|
||||
R_API int r_io_desc_add(RIO *io, int fd, const char *file, int flags, struct r_io_plugin_t *handle);
|
||||
R_API int r_io_desc_del(RIO *io, int fd);
|
||||
R_API struct r_io_desc_t *r_io_desc_get(RIO *io, int fd);
|
||||
R_API int r_io_desc_generate(RIO *io);
|
||||
|
||||
|
||||
/* plugins */
|
||||
extern struct r_io_handle_t r_io_plugin_procpid;
|
||||
extern struct r_io_handle_t r_io_plugin_malloc;
|
||||
extern struct r_io_handle_t r_io_plugin_ptrace;
|
||||
extern struct r_io_handle_t r_io_plugin_w32dbg;
|
||||
extern struct r_io_handle_t r_io_plugin_mach;
|
||||
extern struct r_io_handle_t r_io_plugin_debug;
|
||||
extern struct r_io_handle_t r_io_plugin_shm;
|
||||
extern struct r_io_plugin_t r_io_plugin_procpid;
|
||||
extern struct r_io_plugin_t r_io_plugin_malloc;
|
||||
extern struct r_io_plugin_t r_io_plugin_ptrace;
|
||||
extern struct r_io_plugin_t r_io_plugin_w32dbg;
|
||||
extern struct r_io_plugin_t r_io_plugin_mach;
|
||||
extern struct r_io_plugin_t r_io_plugin_debug;
|
||||
extern struct r_io_plugin_t r_io_plugin_shm;
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
#include <list.h>
|
||||
|
||||
typedef struct r_lang_t {
|
||||
struct r_lang_handle_t *cur;
|
||||
struct r_lang_plugin_t *cur;
|
||||
void *user;
|
||||
struct list_head defs;
|
||||
struct list_head langs;
|
||||
} RLang;
|
||||
|
||||
typedef struct r_lang_handle_t {
|
||||
typedef struct r_lang_plugin_t {
|
||||
const char *name;
|
||||
const char *desc;
|
||||
const char **help;
|
||||
|
@ -23,7 +23,7 @@ typedef struct r_lang_handle_t {
|
|||
int (*run_file)(struct r_lang_t *user, const char *file);
|
||||
int (*set_argv)(struct r_lang_t *user, int argc, char **argv);
|
||||
struct list_head list;
|
||||
} RLangHandle;
|
||||
} RLangPlugin;
|
||||
|
||||
typedef struct r_lang_def_t {
|
||||
char *name;
|
||||
|
@ -36,7 +36,7 @@ typedef struct r_lang_def_t {
|
|||
R_API struct r_lang_t *r_lang_new();
|
||||
R_API void *r_lang_free(struct r_lang_t *lang);
|
||||
R_API int r_lang_setup(RLang *lang);
|
||||
R_API int r_lang_add(struct r_lang_t *lang, struct r_lang_handle_t *foo);
|
||||
R_API int r_lang_add(struct r_lang_t *lang, struct r_lang_plugin_t *foo);
|
||||
R_API int r_lang_list(struct r_lang_t *lang);
|
||||
R_API int r_lang_use(struct r_lang_t *lang, const char *name);
|
||||
R_API int r_lang_run(struct r_lang_t *lang, const char *code, int len);
|
||||
|
|
|
@ -12,11 +12,11 @@
|
|||
|
||||
typedef struct r_parse_t {
|
||||
void *user;
|
||||
struct r_parse_handle_t *cur;
|
||||
struct r_parse_plugin_t *cur;
|
||||
struct list_head parsers;
|
||||
} RParse;
|
||||
|
||||
typedef struct r_parse_handle_t {
|
||||
typedef struct r_parse_plugin_t {
|
||||
char *name;
|
||||
char *desc;
|
||||
int (*init)(void *user);
|
||||
|
@ -25,13 +25,13 @@ typedef struct r_parse_handle_t {
|
|||
int (*assemble)(struct r_parse_t *p, char *data, char *str);
|
||||
int (*filter)(struct r_parse_t *p, struct r_flag_t *f, char *data, char *str);
|
||||
struct list_head list;
|
||||
} RParseHandle;
|
||||
} RParsePlugin;
|
||||
|
||||
/* parse.c */
|
||||
R_API struct r_parse_t *r_parse_new();
|
||||
R_API void r_parse_free(struct r_parse_t *p);
|
||||
R_API void r_parse_set_user_ptr(struct r_parse_t *p, void *user);
|
||||
R_API int r_parse_add(struct r_parse_t *p, struct r_parse_handle_t *foo);
|
||||
R_API int r_parse_add(struct r_parse_t *p, struct r_parse_plugin_t *foo);
|
||||
R_API int r_parse_list(struct r_parse_t *p);
|
||||
R_API int r_parse_use(struct r_parse_t *p, const char *name);
|
||||
R_API int r_parse_parse(struct r_parse_t *p, void *data, char *str);
|
||||
|
@ -39,8 +39,8 @@ R_API int r_parse_assemble(struct r_parse_t *p, char *data, char *str);
|
|||
R_API int r_parse_filter(struct r_parse_t *p, struct r_flag_t *f, char *data, char *str);
|
||||
|
||||
/* plugin pointers */
|
||||
extern struct r_parse_handle_t r_parse_plugin_dummy;
|
||||
extern struct r_parse_handle_t r_parse_plugin_x86_pseudo;
|
||||
extern struct r_parse_handle_t r_parse_plugin_mreplace;
|
||||
extern struct r_parse_plugin_t r_parse_plugin_dummy;
|
||||
extern struct r_parse_plugin_t r_parse_plugin_x86_pseudo;
|
||||
extern struct r_parse_plugin_t r_parse_plugin_mreplace;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -20,7 +20,7 @@ typedef struct r_syscall_t {
|
|||
} RSyscall;
|
||||
|
||||
/* plugin struct */
|
||||
typedef struct r_syscall_handle_t {
|
||||
typedef struct r_syscall_plugin_t {
|
||||
char *name;
|
||||
char *arch;
|
||||
char *os;
|
||||
|
@ -29,9 +29,9 @@ typedef struct r_syscall_handle_t {
|
|||
int nargs;
|
||||
struct r_syscall_args_t *args;
|
||||
struct list_head list;
|
||||
} RSyscallHandle;
|
||||
} RSyscallPlugin;
|
||||
|
||||
typedef struct r_syscall_arch_handle_t {
|
||||
typedef struct r_syscall_arch_plugin_t {
|
||||
char *name;
|
||||
char *arch;
|
||||
char *desc;
|
||||
|
@ -39,7 +39,7 @@ typedef struct r_syscall_arch_handle_t {
|
|||
int nargs;
|
||||
struct r_syscall_args_t **args;
|
||||
struct list_head list;
|
||||
} RSyscallArchHandle;
|
||||
} RSyscallArchPlugin;
|
||||
|
||||
#ifdef R_API
|
||||
R_API RSyscall *r_syscall_new();
|
||||
|
|
|
@ -21,6 +21,6 @@ NOTES: each plugin handle must provide a 'optimal' read size.. or io must be con
|
|||
var io = new Radare.Io();
|
||||
int fd = io.open("/bin/ls");
|
||||
|
||||
foreach (Io.Handle handle in io.handle_list()) {
|
||||
foreach (Io.Plugin handle in io.handle_list()) {
|
||||
stdout.printf(" %s\n", handle.name);
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ R_API int r_io_desc_init(struct r_io_t *io) {
|
|||
return R_TRUE;
|
||||
}
|
||||
|
||||
R_API int r_io_desc_add(struct r_io_t *io, int fd, const char *file, int flags, struct r_io_handle_t *handle) {
|
||||
R_API int r_io_desc_add(struct r_io_t *io, int fd, const char *file, int flags, struct r_io_plugin_t *handle) {
|
||||
RIODesc *desc = R_NEW (RIODesc);
|
||||
if (desc == NULL)
|
||||
return R_FALSE;
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
#include "list.h"
|
||||
#include <stdio.h>
|
||||
|
||||
static struct r_io_handle_t *io_static_plugins[] =
|
||||
static struct r_io_plugin_t *io_static_plugins[] =
|
||||
{ R_IO_STATIC_PLUGINS };
|
||||
|
||||
R_API int r_io_handle_add(struct r_io_t *io, struct r_io_handle_t *plugin) {
|
||||
R_API int r_io_handle_add(struct r_io_t *io, struct r_io_plugin_t *plugin) {
|
||||
int i;
|
||||
struct r_io_list_t *li;
|
||||
if (plugin == NULL)
|
||||
|
@ -33,7 +33,7 @@ R_API int r_io_handle_init(struct r_io_t *io) {
|
|||
return R_TRUE;
|
||||
}
|
||||
|
||||
R_API struct r_io_handle_t *r_io_handle_resolve(struct r_io_t *io, const char *filename) {
|
||||
R_API struct r_io_plugin_t *r_io_handle_resolve(struct r_io_t *io, const char *filename) {
|
||||
struct list_head *pos;
|
||||
list_for_each_prev(pos, &io->io_list) {
|
||||
struct r_io_list_t *il = list_entry(pos, struct r_io_list_t, list);
|
||||
|
@ -47,7 +47,7 @@ R_API struct r_io_handle_t *r_io_handle_resolve(struct r_io_t *io, const char *f
|
|||
return NULL;
|
||||
}
|
||||
|
||||
R_API struct r_io_handle_t *r_io_handle_resolve_fd(struct r_io_t *io, int fd) {
|
||||
R_API struct r_io_plugin_t *r_io_handle_resolve_fd(struct r_io_t *io, int fd) {
|
||||
int i;
|
||||
struct list_head *pos;
|
||||
list_for_each_prev(pos, &io->io_list) {
|
||||
|
@ -60,7 +60,7 @@ R_API struct r_io_handle_t *r_io_handle_resolve_fd(struct r_io_t *io, int fd) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
R_API int r_io_handle_open(struct r_io_t *io, int fd, struct r_io_handle_t *plugin) {
|
||||
R_API int r_io_handle_open(struct r_io_t *io, int fd, struct r_io_plugin_t *plugin) {
|
||||
int i=0;
|
||||
struct list_head *pos;
|
||||
list_for_each_prev(pos, &io->io_list) {
|
||||
|
@ -78,7 +78,7 @@ R_API int r_io_handle_open(struct r_io_t *io, int fd, struct r_io_handle_t *plug
|
|||
return -1;
|
||||
}
|
||||
|
||||
R_API int r_io_handle_close(struct r_io_t *io, int fd, struct r_io_handle_t *plugin) {
|
||||
R_API int r_io_handle_close(struct r_io_t *io, int fd, struct r_io_plugin_t *plugin) {
|
||||
int i=0;
|
||||
struct list_head *pos;
|
||||
list_for_each_prev(pos, &io->io_list) {
|
||||
|
|
|
@ -70,7 +70,7 @@ R_API int r_io_open_as(struct r_io_t *io, const char *urihandler, const char *fi
|
|||
R_API int r_io_open(struct r_io_t *io, const char *file, int flags, int mode) {
|
||||
int fd = -2;
|
||||
char *uri = strdup (file);
|
||||
struct r_io_handle_t *plugin;
|
||||
struct r_io_plugin_t *plugin;
|
||||
if (io != NULL) {
|
||||
for (;;) {
|
||||
plugin = r_io_handle_resolve (io, uri);
|
||||
|
@ -179,7 +179,7 @@ R_API int r_io_resize(struct r_io_t *io, const char *file, int flags, int mode)
|
|||
// XXX not implemented
|
||||
#if 0
|
||||
/* TODO */
|
||||
struct r_io_handle_t *plugin = r_io_handle_resolve(file);
|
||||
struct r_io_plugin_t *plugin = r_io_handle_resolve(file);
|
||||
if (plugin && io->plugin->resize) {
|
||||
int fd = plugin->resize(file, flags, mode);
|
||||
if (fd != -1)
|
||||
|
|
|
@ -70,7 +70,7 @@ static int setup_tokens() {
|
|||
err = 0;
|
||||
err_enable:
|
||||
if (tok != NULL)
|
||||
CloseHandle (tok);
|
||||
ClosePlugin (tok);
|
||||
if (err)
|
||||
r_sys_perror ("setup_tokens");
|
||||
return err;
|
||||
|
@ -102,7 +102,7 @@ static int fork_and_ptraceme(const char *cmd) {
|
|||
THREADENTRY32 te32;
|
||||
HANDLE WINAPI (*win32_openthread)(DWORD, BOOL, DWORD) = NULL;
|
||||
win32_openthread = (HANDLE WINAPI (*)(DWORD, BOOL, DWORD))
|
||||
GetProcAddress (GetModuleHandle ("kernel32"), "OpenThread");
|
||||
GetProcAddress (GetModulePlugin ("kernel32"), "OpenThread");
|
||||
|
||||
th = CreateToolhelp32Snapshot (TH32CS_SNAPTHREAD, pid);
|
||||
if (th == INVALID_HANDLE_VALUE || !Thread32First(th, &te32)) {
|
||||
|
@ -140,7 +140,7 @@ static int fork_and_ptraceme(const char *cmd) {
|
|||
}
|
||||
|
||||
if (th != INVALID_HANDLE_VALUE)
|
||||
CloseHandle (th);
|
||||
ClosePlugin (th);
|
||||
|
||||
|
||||
eprintf ("PID=%d\n", pid);
|
||||
|
@ -150,7 +150,7 @@ static int fork_and_ptraceme(const char *cmd) {
|
|||
err_fork:
|
||||
TerminateProcess (pi.hProcess, 1);
|
||||
if (th != INVALID_HANDLE_VALUE)
|
||||
CloseHandle (th);
|
||||
ClosePlugin (th);
|
||||
return -1;
|
||||
}
|
||||
#else
|
||||
|
@ -251,7 +251,7 @@ static int __init(struct r_io_t *io) {
|
|||
return R_TRUE;
|
||||
}
|
||||
|
||||
struct r_io_handle_t r_io_plugin_debug = {
|
||||
struct r_io_plugin_t r_io_plugin_debug = {
|
||||
//void *handle;
|
||||
.name = "debug",
|
||||
.desc = "Debug a program or pid. dbg:///bin/ls, dbg://1388",
|
||||
|
@ -269,7 +269,7 @@ struct r_io_handle_t r_io_plugin_debug = {
|
|||
*/
|
||||
};
|
||||
#else // DEBUGGER
|
||||
struct r_io_handle_t r_io_plugin_debug = {
|
||||
struct r_io_plugin_t r_io_plugin_debug = {
|
||||
.name = "debug",
|
||||
.desc = "Debug a program or pid. (NOT SUPPORTED FOR THIS PLATFORM)",
|
||||
.debug = (void *)1,
|
||||
|
|
|
@ -123,7 +123,7 @@ static int ewf__open(struct r_io_t *io, const char *pathname, int flags, int mod
|
|||
else {
|
||||
ewf_fd = EWF_FD;
|
||||
#if 0
|
||||
if( ((libewf_internal_handle_t*)ewf_h)->header_values == NULL ) {
|
||||
if( ((libewf_internal_plugin_t*)ewf_h)->header_values == NULL ) {
|
||||
fprintf( stream, "\tNo information found in file.\n" );
|
||||
} else {
|
||||
libewf_get_header_value_examiner_name(ewf_h, hash, 128);
|
||||
|
@ -163,7 +163,7 @@ static int ewf__init(struct r_io_t *io) {
|
|||
return R_TRUE;
|
||||
}
|
||||
|
||||
struct r_io_handle_t r_io_plugin_ewf = {
|
||||
struct r_io_plugin_t r_io_plugin_ewf = {
|
||||
//void *handle;
|
||||
.name = "ewf",
|
||||
.desc = "Forensic file formats (Encase, ..) (ewf://file, els://file)",
|
||||
|
|
|
@ -207,7 +207,7 @@ static int __init(struct r_io_t *io) {
|
|||
}
|
||||
|
||||
// TODO: rename ptrace to io_mach .. err io.ptrace ??
|
||||
struct r_io_handle_t r_io_plugin_mach = {
|
||||
struct r_io_plugin_t r_io_plugin_mach = {
|
||||
//void *handle;
|
||||
.name = "mach",
|
||||
.desc = "mach debug io",
|
||||
|
@ -224,7 +224,7 @@ struct r_io_handle_t r_io_plugin_mach = {
|
|||
|
||||
#else
|
||||
|
||||
struct r_io_handle_t r_io_plugin_mach = {
|
||||
struct r_io_plugin_t r_io_plugin_mach = {
|
||||
.name = "io.ptrace",
|
||||
.desc = "ptrace io (NOT SUPPORTED FOR THIS PLATFORM)",
|
||||
};
|
||||
|
|
|
@ -102,7 +102,7 @@ static int __system(struct r_io_t *io, int fd, const char *cmd)
|
|||
return 0;
|
||||
}
|
||||
|
||||
struct r_io_handle_t r_io_plugin_malloc = {
|
||||
struct r_io_plugin_t r_io_plugin_malloc = {
|
||||
//void *handle;
|
||||
.name = "malloc",
|
||||
.desc = "memory allocation ( malloc://size-in-bytes )",
|
||||
|
|
|
@ -112,7 +112,7 @@ static int __init(struct r_io_t *io) {
|
|||
}
|
||||
|
||||
// TODO: rename ptrace to io_ptrace .. err io.ptrace ??
|
||||
struct r_io_handle_t r_io_plugin_procpid = {
|
||||
struct r_io_plugin_t r_io_plugin_procpid = {
|
||||
//void *handle;
|
||||
.name = "procpid",
|
||||
.desc = "proc/pid/mem io",
|
||||
|
@ -132,7 +132,7 @@ struct r_io_handle_t r_io_plugin_procpid = {
|
|||
*/
|
||||
};
|
||||
#else
|
||||
struct r_io_handle_t r_io_plugin_ptrace = {
|
||||
struct r_io_plugin_t r_io_plugin_ptrace = {
|
||||
.name = "procpid",
|
||||
.desc = "proc/pid/mem io (NOT SUPPORTED FOR THIS PLATFORM)",
|
||||
};
|
||||
|
|
|
@ -150,7 +150,7 @@ static int __init(struct r_io_t *io) {
|
|||
}
|
||||
|
||||
// TODO: rename ptrace to io_ptrace .. err io.ptrace ??
|
||||
struct r_io_handle_t r_io_plugin_ptrace = {
|
||||
struct r_io_plugin_t r_io_plugin_ptrace = {
|
||||
//void *handle;
|
||||
.name = "io_ptrace",
|
||||
.desc = "ptrace io",
|
||||
|
@ -170,7 +170,7 @@ struct r_io_handle_t r_io_plugin_ptrace = {
|
|||
*/
|
||||
};
|
||||
#else
|
||||
struct r_io_handle_t r_io_plugin_ptrace = {
|
||||
struct r_io_plugin_t r_io_plugin_ptrace = {
|
||||
.name = "ptrace",
|
||||
.desc = "ptrace io (NOT SUPPORTED FOR THIS PLATFORM)",
|
||||
};
|
||||
|
|
|
@ -87,7 +87,7 @@ static int shm__init(struct r_io_t *io)
|
|||
return R_TRUE;
|
||||
}
|
||||
|
||||
struct r_io_handle_t r_io_plugin_shm = {
|
||||
struct r_io_plugin_t r_io_plugin_shm = {
|
||||
//void *handle;
|
||||
.name = "shm",
|
||||
.desc = "shared memory resources (shm://key)",
|
||||
|
|
|
@ -91,7 +91,7 @@ static int __init(struct r_io_t *io) {
|
|||
}
|
||||
|
||||
// TODO: rename w32dbg to io_w32dbg .. err io.w32dbg ??
|
||||
struct r_io_handle_t r_io_plugin_w32dbg = {
|
||||
struct r_io_plugin_t r_io_plugin_w32dbg = {
|
||||
//void *handle;
|
||||
.name = "io_w32dbg",
|
||||
.desc = "w32dbg io",
|
||||
|
@ -111,7 +111,7 @@ struct r_io_handle_t r_io_plugin_w32dbg = {
|
|||
*/
|
||||
};
|
||||
#else
|
||||
struct r_io_handle_t r_io_plugin_w32dbg = {
|
||||
struct r_io_plugin_t r_io_plugin_w32dbg = {
|
||||
.name = "w32dbg",
|
||||
.desc = "w32dbg io (NOT SUPPORTED FOR THIS PLATFORM)",
|
||||
};
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#if 0
|
||||
* TODO:
|
||||
* - make path of indirections shortr (io->undo.foo is slow) */
|
||||
* - Handle changes in write and seeks
|
||||
* - Plugin changes in write and seeks
|
||||
* - Per-fd history log
|
||||
#endif
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ R_API int r_lang_setup(RLang *lang) {
|
|||
return ret;
|
||||
}
|
||||
|
||||
R_API int r_lang_add(RLang *lang, struct r_lang_handle_t *foo) {
|
||||
R_API int r_lang_add(RLang *lang, struct r_lang_plugin_t *foo) {
|
||||
if (foo->init)
|
||||
foo->init (lang->user);
|
||||
list_add_tail (&(foo->list), &(lang->langs));
|
||||
|
@ -84,7 +84,7 @@ R_API int r_lang_add(RLang *lang, struct r_lang_handle_t *foo) {
|
|||
R_API int r_lang_list(RLang *lang) {
|
||||
struct list_head *pos;
|
||||
list_for_each_prev (pos, &lang->langs) {
|
||||
RLangHandle *h = list_entry (pos, RLangHandle, list);
|
||||
RLangPlugin *h = list_entry (pos, RLangPlugin, list);
|
||||
printf (" %s: %s\n", h->name, h->desc);
|
||||
}
|
||||
return R_FALSE;
|
||||
|
@ -93,7 +93,7 @@ R_API int r_lang_list(RLang *lang) {
|
|||
R_API int r_lang_use(RLang *lang, const char *name) {
|
||||
struct list_head *pos;
|
||||
list_for_each_prev(pos, &lang->langs) {
|
||||
struct r_lang_handle_t *h = list_entry (pos, struct r_lang_handle_t, list);
|
||||
struct r_lang_plugin_t *h = list_entry (pos, struct r_lang_plugin_t, list);
|
||||
if (!strcmp (h->name, name)) {
|
||||
lang->cur = h;
|
||||
return R_TRUE;
|
||||
|
|
|
@ -9,7 +9,7 @@ static int dummy_run(void *user, const char *code, int len)
|
|||
return R_TRUE;
|
||||
}
|
||||
|
||||
static struct r_lang_handle_t r_lang_plugin_dummy = {
|
||||
static struct r_lang_plugin_t r_lang_plugin_dummy = {
|
||||
.name = "dummy",
|
||||
.desc = "Dummy language extension",
|
||||
.help = NULL,
|
||||
|
|
|
@ -95,7 +95,7 @@ static int lua_run(struct r_lang_t *lang, const char *code, int len)
|
|||
return R_TRUE;
|
||||
}
|
||||
|
||||
static struct r_lang_handle_t r_lang_plugin_lua = {
|
||||
static struct r_lang_plugin_t r_lang_plugin_lua = {
|
||||
.name = "lua",
|
||||
.desc = "LUA language extension",
|
||||
.help = NULL,
|
||||
|
|
|
@ -79,7 +79,7 @@ static const char *help =
|
|||
"Perl plugin usage:\n"
|
||||
" print \"r(\"pd 10\")\\n\";\n";
|
||||
|
||||
static struct r_lang_handle_t r_lang_plugin_perl = {
|
||||
static struct r_lang_plugin_t r_lang_plugin_perl = {
|
||||
.name = "perl",
|
||||
.desc = "Perl language extension",
|
||||
.init = &init,
|
||||
|
|
|
@ -224,7 +224,7 @@ static const char *help =
|
|||
//" r = new RadareInternal()\n"
|
||||
" bytes = r.cmd(\"p8 10\");\n";
|
||||
|
||||
struct r_lang_handle_t r_lang_plugin_python = {
|
||||
struct r_lang_plugin_t r_lang_plugin_python = {
|
||||
.name = "python",
|
||||
.desc = "Python language extension",
|
||||
.init = &init,
|
||||
|
|
|
@ -89,7 +89,7 @@ static const char *help =
|
|||
" $r = RadareInternal.new()\n"
|
||||
" bytes = $r.cmd(\"p8 10\");\n";
|
||||
|
||||
static struct r_lang_handle_t r_lang_plugin_ruby = {
|
||||
static struct r_lang_plugin_t r_lang_plugin_ruby = {
|
||||
.name = "ruby",
|
||||
.desc = "Ruby language extension",
|
||||
.init = &init,
|
||||
|
|
|
@ -16,7 +16,7 @@ static int r_lang_tcc_run(struct r_lang_t *lang, const char *code, int len)
|
|||
return R_TRUE;
|
||||
}
|
||||
|
||||
static struct r_lang_handle_t r_lang_plugin_tcc = {
|
||||
static struct r_lang_plugin_t r_lang_plugin_tcc = {
|
||||
.name = "c99",
|
||||
.desc = "C99 language extension (using libtcc)",
|
||||
.help = NULL,
|
||||
|
|
|
@ -271,7 +271,7 @@ R_API int r_lib_del_handler(RLib *lib, int type) {
|
|||
R_API void r_lib_list(RLib *lib) {
|
||||
struct list_head *pos;
|
||||
#if 0
|
||||
printf("Plugin Handlers:\n");
|
||||
printf("Plugin Plugins:\n");
|
||||
list_for_each_prev(pos, &lib->handlers) {
|
||||
RLibHandler *h = list_entry(pos, RLibHandler, list);
|
||||
printf(" - %d: %s\n", h->type, h->desc);
|
||||
|
|
|
@ -39,7 +39,7 @@ static int r_line_readchar() {
|
|||
#if __WINDOWS__
|
||||
BOOL ret;
|
||||
LPDWORD mode, out;
|
||||
HANDLE h = GetStdHandle (STD_INPUT_HANDLE);
|
||||
HANDLE h = GetStdPlugin (STD_INPUT_HANDLE);
|
||||
|
||||
GetConsoleMode (h, &mode);
|
||||
SetConsoleMode (h, 0); // RAW
|
||||
|
|
|
@ -12,7 +12,7 @@ static int parse(struct r_parse_t *p, void *data, char *str)
|
|||
return R_FALSE;
|
||||
}
|
||||
|
||||
struct r_parse_handle_t r_parse_plugin_dummy = {
|
||||
struct r_parse_plugin_t r_parse_plugin_dummy = {
|
||||
.name = "dummy",
|
||||
.desc = "dummy parsing plugin",
|
||||
.init = NULL,
|
||||
|
|
|
@ -27,7 +27,7 @@ static int parse(struct r_parse_t *p, void *data, char *str)
|
|||
return R_TRUE;
|
||||
}
|
||||
|
||||
struct r_parse_handle_t r_parse_plugin_mreplace = {
|
||||
struct r_parse_plugin_t r_parse_plugin_mreplace = {
|
||||
.name = "mreplace",
|
||||
.desc = "mreplace parsing plugin",
|
||||
.init = NULL,
|
||||
|
@ -38,7 +38,7 @@ struct r_parse_handle_t r_parse_plugin_mreplace = {
|
|||
};
|
||||
|
||||
#else
|
||||
struct r_parse_handle_t r_parse_plugin_mreplace = {
|
||||
struct r_parse_plugin_t r_parse_plugin_mreplace = {
|
||||
.name = "mreplace",
|
||||
.desc = "mreplace parsing plugin (NOT SUPPORTED FOR THIS PLATFORM)",
|
||||
};
|
||||
|
|
|
@ -158,7 +158,7 @@ static int filter(struct r_parse_t *p, struct r_flag_t *f, char *data, char *str
|
|||
return R_FALSE;
|
||||
}
|
||||
|
||||
struct r_parse_handle_t r_parse_plugin_x86_pseudo = {
|
||||
struct r_parse_plugin_t r_parse_plugin_x86_pseudo = {
|
||||
.name = "x86.pseudo",
|
||||
.desc = "X86 pseudo syntax",
|
||||
.init = NULL,
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue