summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandObjectSettings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Commands/CommandObjectSettings.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectSettings.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectSettings.cpp b/lldb/source/Commands/CommandObjectSettings.cpp
index cafb05550f2..95cc9b68a8f 100644
--- a/lldb/source/Commands/CommandObjectSettings.cpp
+++ b/lldb/source/Commands/CommandObjectSettings.cpp
@@ -255,7 +255,14 @@ protected:
if (error.Success())
{
- error = m_interpreter.GetDebugger().SetPropertyValue (&m_exe_ctx,
+ // FIXME this is the same issue as the one in commands script import
+ // we could be setting target.load-script-from-symbol-file which would cause
+ // Python scripts to be loaded, which could run LLDB commands
+ // (e.g. settings set target.process.python-os-plugin-path) and cause a crash
+ // if we did not clear the command's exe_ctx first
+ ExecutionContext exe_ctx(m_exe_ctx);
+ m_exe_ctx.Clear();
+ error = m_interpreter.GetDebugger().SetPropertyValue (&exe_ctx,
eVarSetOperationAssign,
var_name,
var_value_cstr);
OpenPOWER on IntegriCloud