On Darwin based systems, lldb will get notified by dyld before it itself finished initializing, at which point it's not safe to call certain APIs or SPIs. Add a method to the DynamicLoader to query that.
Details
Diff Detail
Event Timeline
lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp | ||
---|---|---|
1118 | Out of curiosity: Is this an error when ReadAllImageInfosStructure() returns false? In that case a better API might be one that also bubbles up the error. |
lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/DynamicLoaderMacOSXDYLD.cpp | ||
---|---|---|
1118 | It can fail if m_dyld_all_image_infos_addr is not known or if we fail to read memory. I guess the latter could be considered an error and something we might want to surface, but probably not from this API. If we don't know the answer to whether it's safe to do so is still no. |
lldb/include/lldb/Target/DynamicLoader.h | ||
---|---|---|
260 | *Perhaps* IsFullyInitialized() ? |
clang-tidy: error: 'lldb/Core/PluginInterface.h' file not found [clang-diagnostic-error]
not useful