[all-commits] [llvm/llvm-project] 8c61c9: [lldb][LocateModuleCallback] Call locate module ca...
Kazuki Sakamoto via All-commits
all-commits at lists.llvm.org
Tue Jul 25 10:59:12 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8c61c9b02b492b00179e6e2cd95d2c54dac69a0e
https://github.com/llvm/llvm-project/commit/8c61c9b02b492b00179e6e2cd95d2c54dac69a0e
Author: Kazuki Sakamoto <sakamoto at splhack.org>
Date: 2023-07-25 (Tue, 25 Jul 2023)
Changed paths:
M lldb/include/lldb/Target/Platform.h
M lldb/include/lldb/Target/Target.h
M lldb/source/Target/Platform.cpp
M lldb/source/Target/Target.cpp
M lldb/unittests/Target/LocateModuleCallbackTest.cpp
Log Message:
-----------
[lldb][LocateModuleCallback] Call locate module callback in Platform too
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.
Differential Revision: https://reviews.llvm.org/D156066
More information about the All-commits
mailing list