diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2025-12-07 15:15:22 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2026-04-25 14:08:55 +0000 |
| commit | 700637cbb5e582861067a11aaca4d053546871d2 (patch) | |
| tree | ab6bc1bd44df7c10d03c5bfb24e6fab6446f32ee /contrib/llvm-project/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp | |
| parent | 6243d755fb82e62d2a3a2e031801e0443150454a (diff) | |
| parent | 3f709e42e3be0f28a88ca3e77663a02b52c914f4 (diff) | |
Merge llvm-project main llvmorg-21-init-19288-gface93e724f4
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-21-init-19288-gface93e724f4, the
last commit before the upstream release/21.x branch was created.
PR: 292067
MFC after: 1 month
Diffstat (limited to 'contrib/llvm-project/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp')
| -rw-r--r-- | contrib/llvm-project/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/contrib/llvm-project/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp b/contrib/llvm-project/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp index e026ffefd645..96b2b9d9ee08 100644 --- a/contrib/llvm-project/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp +++ b/contrib/llvm-project/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp @@ -18,7 +18,6 @@ #include "lldb/Core/Debugger.h" #include "lldb/Core/Module.h" #include "lldb/Core/PluginManager.h" -#include "lldb/Core/ValueObjectVariable.h" #include "lldb/Interpreter/CommandInterpreter.h" #include "lldb/Interpreter/ScriptInterpreter.h" #include "lldb/Symbol/ObjectFile.h" @@ -33,6 +32,7 @@ #include "lldb/Utility/RegisterValue.h" #include "lldb/Utility/StreamString.h" #include "lldb/Utility/StructuredData.h" +#include "lldb/ValueObject/ValueObjectVariable.h" #include <memory> @@ -227,7 +227,7 @@ ThreadSP OperatingSystemPython::CreateThreadFromThreadInfo( ThreadList &old_thread_list, std::vector<bool> &core_used_map, bool *did_create_ptr) { ThreadSP thread_sp; - tid_t tid = LLDB_INVALID_THREAD_ID; + lldb::tid_t tid = LLDB_INVALID_THREAD_ID; if (!thread_dict.GetValueForKeyAsInteger("tid", tid)) return ThreadSP(); @@ -259,8 +259,8 @@ ThreadSP OperatingSystemPython::CreateThreadFromThreadInfo( if (!thread_sp) { if (did_create_ptr) *did_create_ptr = true; - thread_sp = std::make_shared<ThreadMemory>(*m_process, tid, name, queue, - reg_data_addr); + thread_sp = std::make_shared<ThreadMemoryProvidingNameAndQueue>( + *m_process, tid, name, queue, reg_data_addr); } if (core_number < core_thread_list.GetSize(false)) { @@ -386,4 +386,12 @@ lldb::ThreadSP OperatingSystemPython::CreateThread(lldb::tid_t tid, return ThreadSP(); } +bool OperatingSystemPython::DoesPluginReportAllThreads() { + // If the python plugin has a "DoesPluginReportAllThreads" method, use it. + if (std::optional<bool> plugin_answer = + m_operating_system_interface_sp->DoesPluginReportAllThreads()) + return *plugin_answer; + return m_process->GetOSPluginReportsAllThreads(); +} + #endif // #if LLDB_ENABLE_PYTHON |
