Skip to content
Commit 8c61c9b0 authored by Kazuki Sakamoto's avatar Kazuki Sakamoto Committed by Kazuki Sakamoto
Browse files

[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
parent ba531a55
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment