diff options
Diffstat (limited to 'source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp')
-rw-r--r-- | source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp b/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp index 7b027de783ed..20260ee5b5c3 100644 --- a/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp +++ b/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOS.cpp @@ -9,7 +9,6 @@ #include "lldb/Breakpoint/StoppointCallbackContext.h" #include "lldb/Core/Debugger.h" -#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/Section.h" @@ -21,6 +20,7 @@ #include "lldb/Target/StackFrame.h" #include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" +#include "lldb/Utility/Log.h" #include "DynamicLoaderDarwin.h" #include "DynamicLoaderMacOS.h" @@ -139,6 +139,7 @@ bool DynamicLoaderMacOS::DidSetNotificationBreakpoint() { void DynamicLoaderMacOS::ClearNotificationBreakpoint() { if (LLDB_BREAK_ID_IS_VALID(m_break_id)) { m_process->GetTarget().RemoveBreakpointByID(m_break_id); + m_break_id = LLDB_INVALID_BREAK_ID; } } @@ -151,6 +152,11 @@ void DynamicLoaderMacOS::ClearNotificationBreakpoint() { void DynamicLoaderMacOS::DoInitialImageFetch() { Log *log(lldb_private::GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER)); + // Remove any binaries we pre-loaded in the Target before launching/attaching. + // If the same binaries are present in the process, we'll get them from the + // shared module cache, we won't need to re-load them from disk. + UnloadAllImages(); + StructuredData::ObjectSP all_image_info_json_sp( m_process->GetLoadedDynamicLibrariesInfos()); ImageInfo::collection image_infos; |