summaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
diff options
context:
space:
mode:
authorTatyana Krasnukha <tatyana@synopsys.com>2021-02-20 00:49:42 +0300
committerTatyana Krasnukha <tatyana@synopsys.com>2021-02-28 19:23:25 +0300
commitf0f183ee4ad952d94234cf6971c69a044e05c9df (patch)
treed36d5b3aa8719a019529ca7fb702d565042ba498 /lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp
parentef447fe0088cacc38027028d4c43c1938d3eb9e7 (diff)
[lldb/Interpreter] Fix deep copying for OptionValue classes
Some implementations of the DeepCopy function called the copy constructor that copied m_parent member instead of setting a new parent. Others just leaved the base class's members (m_parent, m_callback, m_was_set) empty. One more problem is that not all classes override this function, e.g. OptionValueArgs::DeepCopy produces OptionValueArray instance, and Target[Process/Thread]ValueProperty::DeepCopy produces OptionValueProperty. This makes downcasting via static_cast invalid. The patch implements idiom "virtual constructor" to fix these issues. Add a test that checks DeepCopy for correct copying/setting all data members of the base class. Differential Revision: https://reviews.llvm.org/D96952
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp')
0 files changed, 0 insertions, 0 deletions