[Lldb-commits] [PATCH] D12245: Implement basic DidAttach and DidLaunch for DynamicLoaderWindowsDYLD.

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 21 17:01:00 PDT 2015


By the way, I'm actively working on getting the test suite completely
running on a buildbot, but I need to get down to a green baseline first.
Still a few weeks out, but hopefully this type of thing will be caught
automatically in the future.

On Fri, Aug 21, 2015 at 5:00 PM Zachary Turner <zturner at google.com> wrote:

> 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.
>
> 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.
>
> 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.
>
> Let me know if you need more information.
>
> On Fri, Aug 21, 2015 at 12:29 PM Stephane Sezer <sas at cd80.net> wrote:
>
>> This revision was automatically updated to reflect the committed changes.
>> Closed by commit rL245725: Implement basic DidAttach and DidLaunch for
>> DynamicLoaderWindowsDYLD. (authored by sas).
>>
>> Changed prior to commit:
>>   http://reviews.llvm.org/D12245?vs=32842&id=32853#toc
>>
>> Repository:
>>   rL LLVM
>>
>> http://reviews.llvm.org/D12245
>>
>> Files:
>>
>> lldb/trunk/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp
>>
>> Index:
>> lldb/trunk/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp
>> ===================================================================
>> ---
>> lldb/trunk/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp
>> +++
>> lldb/trunk/source/Plugins/DynamicLoader/Windows-DYLD/DynamicLoaderWindowsDYLD.cpp
>> @@ -9,6 +9,7 @@
>>
>>  #include "DynamicLoaderWindowsDYLD.h"
>>
>> +#include "lldb/Core/Log.h"
>>  #include "lldb/Core/PluginManager.h"
>>  #include "lldb/Target/Process.h"
>>  #include "lldb/Target/Target.h"
>> @@ -72,11 +73,38 @@
>>  void
>>  DynamicLoaderWindowsDYLD::DidAttach()
>>  {
>> +    Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));
>> +    if (log)
>> +        log->Printf("DynamicLoaderWindowsDYLD::%s()", __FUNCTION__);
>> +
>> +    DidLaunch();
>> +
>> +    m_process->LoadModules();
>>  }
>>
>>  void
>>  DynamicLoaderWindowsDYLD::DidLaunch()
>>  {
>> +    Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_DYNAMIC_LOADER));
>> +    if (log)
>> +        log->Printf("DynamicLoaderWindowsDYLD::%s()", __FUNCTION__);
>> +
>> +    ModuleSP executable = GetTargetExecutable();
>> +
>> +    if (!executable.get())
>> +        return;
>> +
>> +    ModuleList module_list;
>> +    module_list.Append(executable);
>> +    // FIXME: We probably should not always use 0 as the load address
>> +    // here. Testing showed that when debugging a process that we start
>> +    // ourselves, there's no randomization of the load address of the
>> +    // main module, therefore an offset of 0 will be valid.
>> +    // If we attach to an already running process, this is probably
>> +    // going to be wrong and we'll have to get the load address somehow.
>> +    UpdateLoadedSections(executable, LLDB_INVALID_ADDRESS, 0);
>> +
>> +    m_process->GetTarget().ModulesDidLoad(module_list);
>>  }
>>
>>  Error
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20150822/756e3929/attachment-0001.html>


More information about the lldb-commits mailing list