* Fix r2-bindings valabind build (python, guile, ..)

This commit is contained in:
pancake 2011-07-07 18:40:18 +02:00
parent 7a79f92c82
commit 2e97cde9dc
6 changed files with 31 additions and 17 deletions

View File

@ -64,29 +64,29 @@ gear:
# TODO: unspaguetti this targets
perl:
@-[ "`grep perl supported.langs`" ] && cd perl && ${MAKE} ; true
@-[ "`grep perl supported.langs`" ] && ( cd perl && ${MAKE} ) || true
python:
@-[ "`grep python supported.langs`" ] && cd python && ${MAKE} ; true
@-[ "`grep python supported.langs`" ] && ( cd python && ${MAKE} ) || true
guile:
@-[ "`grep guile supported.langs`" ] && cd guile && ${MAKE} ; true
@-[ "`grep guile supported.langs`" ] && ( cd guile && ${MAKE} ) || true
ruby:
@-[ "`grep ruby supported.langs`" ] && cd ruby && ${MAKE} ; true
@-[ "`grep ruby supported.langs`" ] && ( cd ruby && ${MAKE} ) || true
lua:
@-[ "`grep lua supported.langs`" ] && cd lua && ${MAKE} ; true
@-[ "`grep lua supported.langs`" ] && ( cd lua && ${MAKE} ) || true
go:
@-[ -x "${GOBIN}/5g" -o -x "${GOBIN}/6g" -o -x "${GOBIN}/8g" ] && \
[ "`grep go supported.langs`" ] && cd go && ${MAKE} ; true
[ "`grep go supported.langs`" ] && ( cd go && ${MAKE} ) || true
java:
@-[ "`grep java supported.langs`" ] && cd java && ${MAKE}
@-[ "`grep java supported.langs`" ] && ( cd java && ${MAKE} ) || true
gir:
@-[ "`grep gir supported.langs`" ] && cd gir && ${MAKE}
@-[ "`grep gir supported.langs`" ] && ( cd gir && ${MAKE} ) || true
test:
cd perl && ${MAKE} test

View File

@ -1,5 +1,17 @@
r2-swig notes
=============
r2-bindings
===========
If you compile from the repo you need valabind and pass the --enable-devel
./configure --prefix=/usr --enable-devel
You can select the languages you want to compile with --enable={list-of-langs}
../configure --prefix=/usr --enable-devel --enable=python
NOTES
=====
The valabind integration forces us to do some changes in the r2 API.

View File

@ -70,4 +70,6 @@ cat supported.langs | sed -e 's,^, - ,'
# check for perl
:> langs.cfg
echo "Supported langs: $(cat supported.langs)"
exit 0

View File

@ -48,7 +48,7 @@ public class RAsm {
}
[CCode (cname="RAsmOp", destroy_function="")]
public struct Op {
public class Op {
public int inst_len;
public uint8 *buf;
public string buf_asm;

View File

@ -50,8 +50,8 @@ public class RCore {
public unowned string disassemble_instr(uint64 addr, int l);
public unowned string disassemble_bytes(uint64 addr, int b);
public int anal_search_preludes();
public int anal_search_prelude(uint64 from, uint64 to, uint8 *k, int ksz, uint8 *m, int msz);
public int search_preludes();
public int search_prelude(uint64 from, uint64 to, uint8 *k, int ksz, uint8 *m, int msz);
public bool anal_all();
public int anal_search (uint64 from, uint64 to, uint64 ref);

View File

@ -3,7 +3,7 @@
[CCode (cheader_filename="r_flags.h,r_list.h,r_types_base.h", cprefix="r_flag_", lower_case_cprefix="r_flag_")]
namespace Radare {
[Compact]
[CCode (cname="struct r_flag_item_t", free_function="free")]
[CCode (cprefix="r_flag_item_", cname="struct r_flag_item_t", free_function="free")]
public class RFlagItem {
public string name;
public uint64 namehash;
@ -23,11 +23,11 @@ namespace Radare {
public void list(bool rad);
public RFlagItem get(string name);
public RFlagItem get_i(uint64 addr);
public bool unset(string name);
public bool unset(string name, RFlagItem? item);
public bool unset_i(uint64 addr, RFlagItem? item);
public bool sort(int namesort);
public static bool name_check(string name);
//public static bool name_check(string name);
//public static bool name_filter(string name);
public bool unset_i(uint64 addr);
public void set(string name, uint64 addr, int size=1, bool dup=false);
public void space_list();