diff options
| author | KyleMiles <krm504@nyu.edu> | 2020-10-08 23:29:39 +0000 |
|---|---|---|
| committer | KyleMiles <krm504@nyu.edu> | 2020-10-19 18:17:38 +0000 |
| commit | 3083903d0ee4ccd18099cb3315e0220c7f5993fb (patch) | |
| tree | 0209754640d3365f07bd204f9bb0f5412b7d1cb9 /demangle.cpp | |
| parent | cbebe461efab02c736c79bf48641f33c793a27f4 (diff) | |
Add Simplifier Implementation
Diffstat (limited to 'demangle.cpp')
| -rw-r--r-- | demangle.cpp | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/demangle.cpp b/demangle.cpp index c3867aed..9ea2bfa0 100644 --- a/demangle.cpp +++ b/demangle.cpp @@ -4,15 +4,13 @@ using namespace std; namespace BinaryNinja { - bool DemangleMS(Architecture* arch, - const std::string& mangledName, - Type** outType, - QualifiedName& outVarName) + bool DemangleMS(Architecture* arch, const std::string& mangledName, Type** outType, + QualifiedName& outVarName, const Ref<BinaryView>& view) { BNType* localType = nullptr; char** localVarName = nullptr; size_t localSize = 0; - if (!BNDemangleMS(arch->GetObject(), mangledName.c_str(), &localType, &localVarName, &localSize)) + if (!BNDemangleMS(arch->GetObject(), mangledName.c_str(), &localType, &localVarName, &localSize, view->GetObject())) return false; if (!localType) return false; @@ -27,15 +25,13 @@ namespace BinaryNinja } - bool DemangleGNU3(Ref<Architecture> arch, - const std::string& mangledName, - Type** outType, - QualifiedName& outVarName) + bool DemangleGNU3(Ref<Architecture> arch, const std::string& mangledName, Type** outType, + QualifiedName& outVarName, const Ref<BinaryView>& view) { BNType* localType; char** localVarName = nullptr; size_t localSize = 0; - if (!BNDemangleGNU3(arch->GetObject(), mangledName.c_str(), &localType, &localVarName, &localSize)) + if (!BNDemangleGNU3(arch->GetObject(), mangledName.c_str(), &localType, &localVarName, &localSize, view->GetObject())) return false; if (!localType) return false; |
