<div dir="ltr">Hi Stephane, I'm sorry but I had to revert this change. When I tested it locally, I did it without running the full test suite, but when I did run the full test suite it showed about 15-20 new test failures. I should have caught this earlier by running the full test suite, so sorry about that.<div><br></div><div>I'm not 100% sure what the cause of the failure is, but I suspect it could be related to DynamicLoaderWindows adding modules to the list *and* ProcessWindows adding modules to the list as well.</div><div><br></div><div>If you need help setting up a Windows machine to test this on let me know. Unfortunately it's not that trivial, but luckily once you get it set up and correctly configured it becomes pretty easy to keep it going smoothly. </div><div><br></div><div>Let me know if you need more information.</div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Aug 21, 2015 at 12:29 PM Stephane Sezer <<a href="mailto:sas@cd80.net">sas@cd80.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This revision was automatically updated to reflect the committed changes.<br>
Closed by commit rL245725: Implement basic DidAttach and DidLaunch for DynamicLoaderWindowsDYLD. (authored by sas).<br>
<br>
Changed prior to commit:<br>
<a href="http://reviews.llvm.org/D12245?vs=32842&id=32853#toc" rel="noreferrer" target="_blank">http://reviews.llvm.org/D12245?vs=32842&id=32853#toc</a><br>
<br>
Repository:<br>
rL LLVM<br>
<br>
<a href="http://reviews.llvm.org/D12245" rel="noreferrer" target="_blank">http://reviews.llvm.org/D12245</a><br>
<br>
Files:<br>
lldb/trunk/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp<br>
<br>
Index: lldb/trunk/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp<br>
===================================================================<br>
--- lldb/trunk/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp<br>
+++ lldb/trunk/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp<br>
@@ -9,6 +9,7 @@<br>
<br>
#include "DynamicLoaderWindowsDYLD.h"<br>
<br>
+#include "lldb/Core/Log.h"<br>
#include "lldb/Core/PluginManager.h"<br>
#include "lldb/Target/Process.h"<br>
#include "lldb/Target/Target.h"<br>
@@ -72,11 +73,38 @@<br>
void<br>
DynamicLoaderWindowsDYLD::DidAttach()<br>
{<br>
+ Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));<br>
+ if (log)<br>
+ log->Printf("DynamicLoaderWindowsDYLD::%s()", __FUNCTION__);<br>
+<br>
+ DidLaunch();<br>
+<br>
+ m_process->LoadModules();<br>
}<br>
<br>
void<br>
DynamicLoaderWindowsDYLD::DidLaunch()<br>
{<br>
+ Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));<br>
+ if (log)<br>
+ log->Printf("DynamicLoaderWindowsDYLD::%s()", __FUNCTION__);<br>
+<br>
+ ModuleSP executable = GetTargetExecutable();<br>
+<br>
+ if (!executable.get())<br>
+ return;<br>
+<br>
+ ModuleList module_list;<br>
+ module_list.Append(executable);<br>
+ // FIXME: We probably should not always use 0 as the load address<br>
+ // here. Testing showed that when debugging a process that we start<br>
+ // ourselves, there's no randomization of the load address of the<br>
+ // main module, therefore an offset of 0 will be valid.<br>
+ // If we attach to an already running process, this is probably<br>
+ // going to be wrong and we'll have to get the load address somehow.<br>
+ UpdateLoadedSections(executable, LLDB_INVALID_ADDRESS, 0);<br>
+<br>
+ m_process->GetTarget().ModulesDidLoad(module_list);<br>
}<br>
<br>
Error<br>
<br>
<br>
</blockquote></div>