summaryrefslogtreecommitdiff
path: root/view/sharedcache/api/sharedcache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'view/sharedcache/api/sharedcache.cpp')
-rw-r--r--view/sharedcache/api/sharedcache.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/view/sharedcache/api/sharedcache.cpp b/view/sharedcache/api/sharedcache.cpp
index b92a0e64..922a7ff3 100644
--- a/view/sharedcache/api/sharedcache.cpp
+++ b/view/sharedcache/api/sharedcache.cpp
@@ -125,13 +125,19 @@ std::string SharedCacheAPI::GetRegionTypeAsString(const BNSharedCacheRegionType
}
}
-Ref<Symbol> CacheSymbol::GetBNSymbol(BinaryView &view) const
+std::pair<std::string, Ref<Type>> CacheSymbol::DemangledName(BinaryView &view) const
{
QualifiedName qname;
- Ref<Type> outType;
+ Ref<Type> outType = nullptr;
std::string shortName = name;
if (DemangleGeneric(view.GetDefaultArchitecture(), name, outType, qname, &view, true))
shortName = qname.GetString();
+ return {shortName, outType};
+}
+
+Ref<Symbol> CacheSymbol::GetBNSymbol(BinaryView &view) const
+{
+ auto [shortName, _] = DemangledName(view);
return new Symbol(type, shortName, shortName, name, address, nullptr);
}