Thank you for the suggestion.
To address the multiple targets use-case, how about to use SBPlatform
method instead of SBDebugger
?
# platform: lldb.SBPlatform
platform.SetTargetGetModuleCallback(callback)
Target
instance always retains PlatformSP
set by the Target
constructor or SetPlatform
. Therefore, if Platform
instance retains the callback that is set by the SBPlatform
method, Target
instance could use it all the time.