[Lldb-commits] [PATCH] D156066: [lldb][LocateModuleCallback] Call locate module callback in Platform too
Kazuki Sakamoto via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Sun Jul 23 14:08:27 PDT 2023
splhack created this revision.
splhack added reviewers: clayborg, jingham, bulbazord, jasonmolenda, JDevlieghere, mib.
Herald added a project: All.
splhack requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.
This is an enhancement for the locate module callback.
https://discourse.llvm.org/t/rfc-python-callback-for-target-get-module/71580/6
On Android remote platform, module UUID is resolved by
Platform::GetRemoteSharedModule. Which means the current
Target::CallLocateModuleCallbackIfSet() call undesirably is not able to pass the
module UUID to the locate module callback.
This diff moves the CallLocateModuleCallbackIfSet() implementation from Target
to Platform to allows both Target and Platform can call it. One is from the
current Target call site, and second is from Platform after resolving the module
UUID.
As the result of this change, the locate module callback may be called twice
for a same module on remote platforms. And it should be ok.
- First, without UUID.
- The locate module callback is allowed to return an error if the callback requires UUID.
- Second, with UUID, if the first callback call did not return a module.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D156066
Files:
lldb/include/lldb/Target/Platform.h
lldb/include/lldb/Target/Target.h
lldb/source/Target/Platform.cpp
lldb/source/Target/Target.cpp
lldb/unittests/Target/LocateModuleCallbackTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156066.543327.patch
Type: text/x-patch
Size: 41806 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230723/5c0a4d8f/attachment-0001.bin>
More information about the lldb-commits
mailing list