diff --git a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp index 93b559f93831..2d17fccd75a0 100644 --- a/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp +++ b/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp @@ -316,6 +316,9 @@ DYLDRendezvous::TakeSnapshot(SOEntryList &entry_list) if (m_current.map_addr == 0) return false; + // Clear previous entries since we are about to obtain an up to date list. + entry_list.clear(); + for (addr_t cursor = m_current.map_addr; cursor != 0; cursor = entry.next) { if (!ReadSOEntryFromMemory(cursor, entry))