Moving executable module symbols parsing to target creation method.
authorLevon Ter-Grigoryan <patriosthegreat@protonmail.ch>
Thu, 14 May 2020 14:05:40 +0000 (16:05 +0200)
committerPavel Labath <pavel@labath.sk>
Thu, 14 May 2020 14:54:14 +0000 (16:54 +0200)
commit631048e8117864c09672e33eb7b6fcc4efe5f749
treee4f1b4dda240ed8612d5669f746dd90a2ff2753c
parentab9f11168f55add345f29592ec0946ac2e5ae697
Moving executable module symbols parsing to target creation method.

Summary:
In our project we are using remote client-server LLDB configuration.
We want to parse as much debugging symbols as we can before debugger starts attachment to the remote process.
To do that we are passing the path of the local executable module to CreateTarget method at the client.
But, it seems that this method are not parsing the executable module symbols.
To fix this I added PreloadSymbols call for executable module to target creation method.

This patch also fixes a problem where the DynamicLoader would reset a
module when launching the target. We fix it by making sure
Platform::ResolveExecutable returns the module object obtained from the
remote platform.

Reviewed By: labath

Differential Revision: https://reviews.llvm.org/D78654
lldb/source/Target/RemoteAwarePlatform.cpp
lldb/source/Target/TargetList.cpp
lldb/unittests/Target/CMakeLists.txt
lldb/unittests/Target/RemoteAwarePlatformTest.cpp [new file with mode: 0644]