Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions demangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,19 @@ namespace BinaryNinja {
bool DemangleMS(Architecture* arch, const std::string& mangledName, Ref<Type>& outType, QualifiedName& outVarName,
BinaryView* view)
{
const bool simplify = Settings::Instance()->Get<bool>("analysis.types.templateSimplifier", view);
return DemangleMS(arch, mangledName, outType, outVarName, simplify);
BNType* localType = nullptr;
char** localVarName = nullptr;
size_t localSize = 0;
if (!BNDemangleMSWithOptions(arch->GetObject(), mangledName.c_str(), &localType, &localVarName, &localSize,
view ? view->GetObject() : nullptr))
return false;
outType = localType ? new Type(localType) : nullptr;
for (size_t i = 0; i < localSize; i++)
{
outVarName.push_back(localVarName[i]);
}
BNFreeDemangledName(&localVarName, localSize);
return true;
}

bool DemangleMS(Architecture* arch, const std::string& mangledName, Ref<Type>& outType, QualifiedName& outVarName,
Expand Down
Loading
Loading