[Lldb-commits] [PATCH] D153734: [lldb][LocateModuleCallback] Call locate module callback

Kazuki Sakamoto via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jul 11 16:55:02 PDT 2023


splhack added inline comments.


================
Comment at: lldb/include/lldb/Target/Platform.h:944
   const std::unique_ptr<ModuleCache> m_module_cache;
+  LocateModuleCallback m_locate_module_callback;
 
----------------
clayborg wrote:
> We probably need a baton still. In order to make this work for python, we need to be able to set a callback and a baton for the python callable?
@clayborg Yes, in D153735, both the callback and the baton are captured and retained by SBPlatform. The reason of why SBPlatform captures and retains the callback and the baton is the SBPlatformLocateModuleCallback type contains SBModuleSpec type and SBFileSpec type in the argument. Which are not available in Platform.h.

```
typedef SBError (*SBPlatformLocateModuleCallback)(
    void *baton, const SBModuleSpec &module_spec, SBFileSpec &module_file_spec,
    SBFileSpec &symbol_file_spec);
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153734/new/

https://reviews.llvm.org/D153734



More information about the lldb-commits mailing list