DEPRECATED
February 7, 2017 ยท View on GitHub
This was an ad-hoc re-exporting of BAP. The project now provides an official set of C bindings, which, while not stable yet, are more stable than these were.
tl;dr go use bap-bindings, this is no longer maintained
libbap
C Bindings for BAP
libbap is intended to provide static and shared library versions of BAP as a series of C functions, suitable to be called from other languages.
Goals
- Export most (if not all) of BAP's capabilities to C.
- Require no OCaml tooling or libraries once installed.
- Be relatively efficient - avoid copies where possible, this is meant to be a thin layer around BAP
Build/Install
oasis setup
./configure
make
make install
Usage
- Call
bap_initbefore calling any function.
Threading
You have two basic options:
- Make all calls to
libbapfrom the thread in whichbap_initwas initially called. - Be aware that calls into
libbapall block each other. This is due to a limitation in the OCaml runtime.
- The call to
bap_initalso acts as a call tobap_thread_registerfollowed bybap_acquire - Every thread which calls into
libbapmust callbap_thread_registerfirst. - Any calls into
libbapmust be bracketed bybap_acquireandbap_releasecalls. - The lock must not be held by a thread calling
bap_thread_unregisterorbap_thread_register - Any thread which registered with
libbapviabap_thread_registermust callbap_thread_unregisterbefore termination.
Warning
This project is currently extremely nascent, and likely does not have any functionality that you want yet. This warning will be removed at first release or when enough functionality is present to be useful.