- Notifications
You must be signed in to change notification settings - Fork0
A C++ API usage querying tool I developed for my MSc. dissertation. An open access paper is available here:https://www.mdpi.com/2079-9292/9/7/1077
License
phitsc/find-api-usage
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
find-api-usage can be tried out on the libbitcoin libraries using thephitsc/check-libbitcoin-api Docker image. On any system with Docker installed, run the following command to start a Bash shell in a Docker container based on thephitsc/check-libbitcoin-api Docker image.
docker run -it --rm phitsc/check-libbitcoin-api:1.3 /bin/bashThen, within the Bash shell in the newly started Docker container, run for example:
cd ~/libbitcoin-all find . -name '*.cpp' -exec find-api-usage \ -function-call='create_key_pair' \ -function-call='create_token' \ -function-call='encrypt' \ -function-call='sign_message' \ {} + 2>/dev/nullFollow the build instructions onhttps://clang.llvm.org/get_started.html . Make sure to include step 4 'extra Clang tools'.
Clone thefind-api-usage repository into
llvm/tools/clang/tools/extra/.Add
add_subdirectory(find-api-usage)at the bottom ofllvm/tools/clang/tools/extra/CMakeLists.txtBuild everything as described in step 7 'Build LLVM and Clang' onhttps://clang.llvm.org/get_started.html .
Clone thefind-api-usage repository into a directory of your choice and change into that directory.
git clone --recursive https://github.com/phitsc/find-api-usage.git cd find-api-usageCreate thelibtooling docker image for building Clang tools.
sudo docker build -t libtooling api-utils-common/DockerRun the make script.
./make
Change into
find-api-usage/test/integration_tests.cd test/integration_testsCreate the
builddirdirectory and change into it.mkdir builddir cd builddirCreate the compilation database.
cmake -G Ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..Make sure the
compile_commands.jsonfile has been created in theintegration_tests/builddirdirectory.Change back into the
find-api-usagedirectory and runfind-api-usage.cd ../../.. ./find-api-usage \ -p test/integration_tests/builddir \ -function-call='fn2' -extra-arg=-Wno-unused-variable test/integration_tests/src/main.cppNote thatfind-api-usage must be executed on the same host platform on which the compilation database was created or the script will not be able to map the source file paths from the host filesystem to to container filesystem.
About
A C++ API usage querying tool I developed for my MSc. dissertation. An open access paper is available here:https://www.mdpi.com/2079-9292/9/7/1077
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.