[Lldb-commits] [PATCH] Fix duplicate shared module list entries

Aidan Dodds Aidan at codeplay.com
Wed Jun 17 03:20:59 PDT 2015


Hi clayborg,

The POSIX DYLD has a fault causing it to duplicate all of the shared module entries twice.  This happens because DYLDRendezvous::TakeSnapshot is called twice upon attach, and it appends to the list each time, rather then replacing its contents.  This is fixed by clearing the list before taking a new snapshot.

REPOSITORY
  rL LLVM

http://reviews.llvm.org/D10499

Files:
  source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp

Index: source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
===================================================================
--- source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
+++ source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
@@ -326,6 +326,9 @@
     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))

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10499.27821.patch
Type: text/x-patch
Size: 584 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150617/8bb02171/attachment.bin>


More information about the lldb-commits mailing list