diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
commit | cfca06d7963fa0909f90483b42a6d7d194d01e08 (patch) | |
tree | 209fb2a2d68f8f277793fc8df46c753d31bc853b /lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp | |
parent | 706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff) |
Notes
Diffstat (limited to 'lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp')
-rw-r--r-- | lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp index b04ac61c99a1..417aa2e21436 100644 --- a/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp +++ b/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp @@ -1,4 +1,4 @@ -//===-- OperatingSystemPython.cpp --------------------------------*- C++-*-===// +//===-- OperatingSystemPython.cpp -----------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -39,6 +39,8 @@ using namespace lldb; using namespace lldb_private; +LLDB_PLUGIN_DEFINE(OperatingSystemPython) + void OperatingSystemPython::Initialize() { PluginManager::RegisterPlugin(GetPluginNameStatic(), GetPluginDescriptionStatic(), CreateInstance, @@ -337,7 +339,7 @@ OperatingSystemPython::CreateRegisterContextForThread(Thread *thread, m_interpreter->OSPlugin_RegisterContextData(m_python_object_sp, thread->GetID()); if (reg_context_data) { - std::string value = reg_context_data->GetValue(); + std::string value = std::string(reg_context_data->GetValue()); DataBufferSP data_sp(new DataBufferHeap(value.c_str(), value.length())); if (data_sp->GetByteSize()) { RegisterContextMemory *reg_ctx_memory = new RegisterContextMemory( |