From 85d51eeefdca18ec9efe8c4b85d9e5b457ad9e11 Mon Sep 17 00:00:00 2001 From: Mason Reed Date: Sun, 11 May 2025 21:40:35 -0400 Subject: Misc shared cache improvements - Removed last use of user object creation in objective-c - Fixed function type info being omitted from certain images loaded automatically - Add TODO about undo action in view init. This is not critical, just a non-actionable warning because of a design flaw I will restate this again for anyone in the future, until the undo action system is thread-safe avoid calling it from any thread other than the main thread, it is very easy to deadlock or cause other issues. That goes for basically all user analysis object creation. --- view/sharedcache/core/Utility.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'view/sharedcache/core/Utility.cpp') diff --git a/view/sharedcache/core/Utility.cpp b/view/sharedcache/core/Utility.cpp index 8f49c6bf..6f8323bf 100644 --- a/view/sharedcache/core/Utility.cpp +++ b/view/sharedcache/core/Utility.cpp @@ -90,8 +90,11 @@ void ApplySymbol(Ref view, Ref typeLib, Ref sym // Make sure to check for already added function from the function table. // Unless we have retrieved a type here we don't need to make a new function. func = view->GetAnalysisFunction(targetPlatform, symbolAddress); - if (!func || selectedType) + if (!func || selectedType != nullptr) func = view->AddFunctionForAnalysis(targetPlatform, symbolAddress, false, selectedType); + // The above function might be overwritten so we also want to apply the type here. + if (func && selectedType != nullptr) + func->ApplyAutoDiscoveredType(selectedType); } else { -- cgit v1.3.1