[lldb] Add OS plugin property for reporting all threads (#123145)

Currently, an LLDB target option controls whether plugins report all
threads. However, it seems natural for this knowledge could come from
the plugin itself. To support this, this commits adds a virtual method
to the plugin base class, making the Python OS query the target option
to preserve existing behavior.
This commit is contained in:
Felipe de Azevedo Piovezan authored and GitHub committed 2025-01-16 15:05:46 -08:00
1 parent bb6e94a05d
commit cb82771c96
10 files changed
+31 -7

No files matched your search

@@ -82,6 +82,16 @@ OperatingSystemPythonInterface::GetRegisterContextForTID(lldb::tid_t tid) {
return obj->GetAsString()->GetValue().str();
}
std::optional<bool> OperatingSystemPythonInterface::DoesPluginReportAllThreads() {
Status error;
StructuredData::ObjectSP obj = Dispatch("does_plugin_report_all_threads", error);
if (!ScriptedInterface::CheckStructuredDataObject(LLVM_PRETTY_FUNCTION, obj,
error))
return {};
return obj->GetAsBoolean()->GetValue();
}
void OperatingSystemPythonInterface::Initialize() {
const std::vector<llvm::StringRef> ci_usages = {
"settings set target.process.python-os-plugin-path <script-path>",