diff options
| author | Rusty Wagner <rusty@vector35.com> | 2015-08-14 02:45:01 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2015-08-14 02:45:01 -0400 |
| commit | a401883aa235b222ceed191f455a776b23a3a689 (patch) | |
| tree | 24a081f294cf57ee3e380e22fe50616ff7747c11 /functionrecognizer.cpp | |
| parent | 3e7e5e6f6593b425319f51bc553d1cb10b2148ff (diff) | |
Recognize PLT entries on x86 Linux
Diffstat (limited to 'functionrecognizer.cpp')
| -rw-r--r-- | functionrecognizer.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/functionrecognizer.cpp b/functionrecognizer.cpp new file mode 100644 index 00000000..6aa89098 --- /dev/null +++ b/functionrecognizer.cpp @@ -0,0 +1,33 @@ +#include "binaryninjaapi.h" + +using namespace BinaryNinja; + + +FunctionRecognizer::FunctionRecognizer() +{ +} + + +bool FunctionRecognizer::RecognizeLowLevelILCallback(void* ctxt, BNBinaryView* data, BNFunction* func, BNLowLevelILFunction* il) +{ + FunctionRecognizer* recog = (FunctionRecognizer*)ctxt; + Ref<BinaryView> dataObj = new BinaryView(BNNewViewReference(data)); + Ref<Function> funcObj = new Function(BNNewFunctionReference(func)); + Ref<LowLevelILFunction> ilObj = new LowLevelILFunction(BNNewLowLevelILFunctionReference(il)); + return recog->RecognizeLowLevelIL(dataObj, funcObj, ilObj); +} + + +void FunctionRecognizer::RegisterGlobalRecognizer(FunctionRecognizer* recog) +{ + BNFunctionRecognizer reg; + reg.context = recog; + reg.recognizeLowLevelIL = RecognizeLowLevelILCallback; + BNRegisterGlobalFunctionRecognizer(®); +} + + +bool FunctionRecognizer::RecognizeLowLevelIL(BinaryView*, Function*, LowLevelILFunction*) +{ + return false; +} |
