diff options
| author | Mason Reed <mason@vector35.com> | 2025-04-08 14:16:05 -0400 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-04-08 14:16:16 -0400 |
| commit | 0f26e9236d52e5e2f0a8e64114d954a516cbeb95 (patch) | |
| tree | 3f011a89ae1f486eec1641a5c01a9dfc392086ba /view/sharedcache/api/sharedcache.cpp | |
| parent | a45466fc3227c615c72e77eb7368d7e83220b325 (diff) | |
[SharedCache] Apply demangled names and types more broadly
Fixes the case of stub functions being applied with mangled names.
Diffstat (limited to 'view/sharedcache/api/sharedcache.cpp')
| -rw-r--r-- | view/sharedcache/api/sharedcache.cpp | 10 |
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); } |
