From 706b4fc47bbc608932d3b491ae19a3b9cde9497b Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Fri, 17 Jan 2020 20:45:01 +0000 Subject: Vendor import of llvm-project master e26a78e70, the last commit before the llvmorg-11-init tag, from which release/10.x was branched. --- .../OperatingSystem/Python/OperatingSystemPython.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp') diff --git a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp index b777a53191042..b04ac61c99a1e 100644 --- a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp +++ b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp @@ -6,7 +6,9 @@ // //===----------------------------------------------------------------------===// -#ifndef LLDB_DISABLE_PYTHON +#include "lldb/Host/Config.h" + +#if LLDB_ENABLE_PYTHON #include "OperatingSystemPython.h" @@ -88,13 +90,12 @@ OperatingSystemPython::OperatingSystemPython(lldb_private::Process *process, python_module_path.GetFilename().AsCString("")); if (!os_plugin_class_name.empty()) { const bool init_session = false; - const bool allow_reload = true; char python_module_path_cstr[PATH_MAX]; python_module_path.GetPath(python_module_path_cstr, sizeof(python_module_path_cstr)); Status error; - if (m_interpreter->LoadScriptingModule( - python_module_path_cstr, allow_reload, init_session, error)) { + if (m_interpreter->LoadScriptingModule(python_module_path_cstr, + init_session, error)) { // Strip the ".py" extension if there is one size_t py_extension_pos = os_plugin_class_name.rfind(".py"); if (py_extension_pos != std::string::npos) @@ -166,7 +167,7 @@ bool OperatingSystemPython::UpdateThreadList(ThreadList &old_thread_list, Target &target = m_process->GetTarget(); std::unique_lock api_lock(target.GetAPIMutex(), std::defer_lock); - api_lock.try_lock(); + (void)api_lock.try_lock(); // See above. auto interpreter_lock = m_interpreter->AcquireInterpreterLock(); LLDB_LOGF(log, @@ -308,7 +309,7 @@ OperatingSystemPython::CreateRegisterContextForThread(Thread *thread, Target &target = m_process->GetTarget(); std::unique_lock api_lock(target.GetAPIMutex(), std::defer_lock); - api_lock.try_lock(); + (void)api_lock.try_lock(); // See above. auto interpreter_lock = m_interpreter->AcquireInterpreterLock(); Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_THREAD)); @@ -395,7 +396,7 @@ lldb::ThreadSP OperatingSystemPython::CreateThread(lldb::tid_t tid, Target &target = m_process->GetTarget(); std::unique_lock api_lock(target.GetAPIMutex(), std::defer_lock); - api_lock.try_lock(); + (void)api_lock.try_lock(); // See above. auto interpreter_lock = m_interpreter->AcquireInterpreterLock(); StructuredData::DictionarySP thread_info_dict = @@ -416,4 +417,4 @@ lldb::ThreadSP OperatingSystemPython::CreateThread(lldb::tid_t tid, return ThreadSP(); } -#endif // #ifndef LLDB_DISABLE_PYTHON +#endif // #if LLDB_ENABLE_PYTHON -- cgit v1.2.3