[Lldb-commits] [lldb] r123794 - /lldb/trunk/source/Plugins/DynamicLoader/Linux-DYLD/DYLDRendezvous.cpp
Stephen Wilson
wilsons at start.ca
Tue Jan 18 17:28:39 PST 2011
Author: wilsons
Date: Tue Jan 18 19:28:39 2011
New Revision: 123794
URL: http://llvm.org/viewvc/llvm-project?rev=123794&view=rev
Log:
Load dependent modules in the Linux dynamic loader.
This fixes a bug where the dynamic loader rendezvous was not updating its
internal state when first initialized.
Modified:
lldb/trunk/source/Plugins/DynamicLoader/Linux-DYLD/DYLDRendezvous.cpp
Modified: lldb/trunk/source/Plugins/DynamicLoader/Linux-DYLD/DYLDRendezvous.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/Linux-DYLD/DYLDRendezvous.cpp?rev=123794&r1=123793&r2=123794&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/Linux-DYLD/DYLDRendezvous.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/Linux-DYLD/DYLDRendezvous.cpp Tue Jan 18 19:28:39 2011
@@ -117,6 +117,12 @@
if (m_current.map_addr == 0)
return false;
+ // When the previous and current states are consistent this is the first
+ // time we have been asked to update. Just take a snapshot of the currently
+ // loaded modules.
+ if (m_previous.state == eConsistent && m_current.state == eConsistent)
+ return TakeSnapshot(m_soentries);
+
// If we are about to add or remove a shared object clear out the current
// state and take a snapshot of the currently loaded images.
if (m_current.state == eAdd || m_current.state == eDelete)
@@ -127,6 +133,7 @@
m_removed_soentries.clear();
return TakeSnapshot(m_soentries);
}
+ assert(m_current.state == eConsistent);
// Otherwise check the previous state to determine what to expect and update
// accordingly.
More information about the lldb-commits
mailing list