mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-11 15:04:23 +00:00
19fa55ba33
* Properly installation of vapi files - Lot of fixtures to build a external hello world in gtk+vala+r_asm - default staticplugins for r_asm are: mips, java and x86_olly by default - Add r_util.vapi and make .pc file point to -lr_util - Use .deps to generate dependencies between vapi files - Fix r_asm.vapi (Added Asm.Aop struct) - add set(string) method - asm/disasm -> assemble/disassemble * Fix warning + build in sign.c - Included in default build * Fix segfault in r_lib with NULL in opendir() * More fixtures for r_asm_plugin_* - use #ifndef CORELIB - drop 'static' * Update README
35 lines
1010 B
Plaintext
35 lines
1010 B
Plaintext
There is a way to implement dynamic language plugins for radare...
|
|
|
|
A stub generator will be appreciated to create all the necessary
|
|
boilerplate to write a single .c file calling the perl/python/ruby
|
|
interface from each method hook.
|
|
|
|
We should define a common and simple way to design those inter-
|
|
language communications.
|
|
|
|
With this interface properly defined we can get some more fun and
|
|
write the language bindings using the same lang-C api.
|
|
|
|
A simple perl script can be used to parse function signatures and
|
|
enums to fill the structures in the proper way (SWIG replacement)
|
|
|
|
help is welcome!
|
|
|
|
------------------8<------------------------------
|
|
|
|
some random food:
|
|
|
|
#include <r_lang_lib.h>
|
|
|
|
static int disassemble(struct r_asm_t *a, struct r_asm_aop_t *aop, u8 *buf, u64 len)
|
|
{
|
|
LANG_PERL_SET_U8P("$buf", buf);
|
|
LANG_PERL_SET_U64("$len", len);
|
|
LANG_PERL(
|
|
"print \"Hello World $len\";
|
|
$ret = 1;")
|
|
return LANG_PERL_GET($ret);
|
|
}
|
|
|
|
PLUGIN_ASM("asm_ppc", "PPC disassembly plugin", NULL, NULL, &disasm, NULL);
|