@@ -2362,14 +2362,15 @@ void SharedCache::ApplySymbol(Ref<BinaryView> view, Ref<TypeLibrary> typeLib, Re
23622362 if (typeLib)
23632363 {
23642364 auto type = m_dscView->ImportTypeLibraryObject (typeLib, {symbol->GetFullName ()});
2365+ // TODO: This is still auto
23652366 if (type)
23662367 view->DefineAutoSymbolAndVariableOrFunction (view->GetDefaultPlatform (), symbol, type);
23672368 else
2368- view->DefineAutoSymbol (symbol);
2369+ view->DefineAutoUserSymbol (symbol);
23692370 }
23702371 else
23712372 {
2372- view->DefineAutoSymbol (symbol);
2373+ view->DefineAutoUserSymbol (symbol);
23732374 }
23742375
23752376 if (!func)
@@ -3274,59 +3275,6 @@ void Serialize(SerializationContext& context, const std::shared_ptr<std::vector<
32743275 Serialize (context, *value);
32753276}
32763277
3277- void Deserialize (DeserializationContext& context, std::string_view name,
3278- std::unordered_map<uint64_t , std::shared_ptr<std::unordered_map<uint64_t , Ref<Symbol>>>>& value)
3279- {
3280- auto array = context.doc [name.data ()].GetArray ();
3281- for (auto & pair : array)
3282- {
3283- auto symbols_array = pair[1 ].GetArray ();
3284- std::unordered_map<uint64_t , Ref<Symbol>> symbols;
3285- for (auto & symbol_value : symbols_array)
3286- {
3287- auto symbol_array = symbol_value.GetArray ();
3288- std::string symbolName = symbol_array[0 ].GetString ();
3289- uint64_t address = symbol_array[1 ].GetUint64 ();
3290- BNSymbolType type = (BNSymbolType)symbol_array[2 ].GetUint ();
3291-
3292- QualifiedName demangledName = {};
3293- std::string shortName = symbolName;
3294- if (DemangleLLVM (symbolName, demangledName, true ))
3295- shortName = demangledName.GetString ();
3296- Ref<Symbol> sym = new Symbol (type, shortName, shortName, symbolName, address, nullptr );
3297- symbols.insert ({address, sym});
3298- }
3299- value[pair[0 ].GetUint64 ()] = std::make_shared<std::unordered_map<uint64_t , Ref<Symbol>>>(std::move (symbols));
3300- }
3301- }
3302-
3303- void Deserialize (DeserializationContext& context, std::string_view name,
3304- std::unordered_map<uint64_t , std::shared_ptr<std::vector<Ref<Symbol>>>>& value)
3305- {
3306- auto array = context.doc [name.data ()].GetArray ();
3307- for (auto & pair : array)
3308- {
3309- auto symbols_array = pair[1 ].GetArray ();
3310- std::vector<Ref<Symbol>> symbols;
3311- symbols.reserve (symbols_array.Size ());
3312- for (auto & symbol_value : symbols_array)
3313- {
3314- auto symbol_array = symbol_value.GetArray ();
3315- std::string symbolName = symbol_array[0 ].GetString ();
3316- uint64_t address = symbol_array[1 ].GetUint64 ();
3317- BNSymbolType type = (BNSymbolType)symbol_array[2 ].GetUint ();
3318-
3319- QualifiedName demangledName = {};
3320- std::string shortName = symbolName;
3321- if (DemangleLLVM (symbolName, demangledName, true ))
3322- shortName = demangledName.GetString ();
3323- Ref<Symbol> sym = new Symbol (type, shortName, shortName, symbolName, address, nullptr );
3324- symbols.emplace_back (sym);
3325- }
3326- value[pair[0 ].GetUint64 ()] = std::make_shared<std::vector<Ref<Symbol>>>(std::move (symbols));
3327- }
3328- }
3329-
33303278void Deserialize (DeserializationContext& context, std::string_view name, std::optional<DSCViewState>& viewState)
33313279{
33323280 auto & value = context.doc [name.data ()];
@@ -3399,8 +3347,6 @@ std::optional<SharedCache::CacheInfo> SharedCache::CacheInfo::Load(Deserializati
33993347void State::Store (SerializationContext& context, std::optional<DSCViewState> viewState) const
34003348{
34013349 MSS (memoryRegionStatus);
3402- MSS (exportInfos);
3403- MSS (symbolInfos);
34043350 MSS (viewState);
34053351}
34063352
@@ -3413,8 +3359,6 @@ SharedCache::ModifiedState SharedCache::ModifiedState::Load(DeserializationConte
34133359{
34143360 SharedCache::ModifiedState state;
34153361 state.MSL (memoryRegionStatus);
3416- state.MSL (exportInfos);
3417- state.MSL (symbolInfos);
34183362 state.MSL (viewState);
34193363 return state;
34203364}
0 commit comments