summaryrefslogtreecommitdiff
path: root/view/sharedcache/core/SharedCache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'view/sharedcache/core/SharedCache.cpp')
-rw-r--r--view/sharedcache/core/SharedCache.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/view/sharedcache/core/SharedCache.cpp b/view/sharedcache/core/SharedCache.cpp
index 56d2040d..d0c3d25b 100644
--- a/view/sharedcache/core/SharedCache.cpp
+++ b/view/sharedcache/core/SharedCache.cpp
@@ -11,11 +11,12 @@ using namespace BinaryNinja;
// The next id to use when calling Cache::AddEntry
static CacheEntryId nextId = 1;
-Ref<Symbol> CacheSymbol::ToBNSymbol() const
+Ref<Symbol> CacheSymbol::ToBNSymbol(BinaryView& view) const
{
QualifiedName qname;
+ Ref<Type> outType;
std::string shortName = name;
- if (DemangleLLVM(name, qname, true))
+ if (DemangleGeneric(view.GetDefaultArchitecture(), name, outType, qname, &view, true))
shortName = qname.GetString();
return new Symbol(type, shortName, shortName, name, address, nullptr);
}
@@ -458,7 +459,7 @@ std::optional<CacheImage> SharedCache::GetImageContaining(const uint64_t address
{
// TODO: What if we are using this on a shared region? Return a list of images?
auto region = GetRegionContaining(address);
- if (region.has_value())
+ if (region.has_value() && region->imageStart.has_value())
return GetImageAt(*region->imageStart);
return std::nullopt;
}