diff options
author | Enrico Granata <egranata@apple.com> | 2013-05-09 19:33:49 +0000 |
---|---|---|
committer | Enrico Granata <egranata@apple.com> | 2013-05-09 19:33:49 +0000 |
commit | 078551c7b1b9ea71e32b0c9f87fb547d9f3ed9c7 (patch) | |
tree | dd2b46da61cdd56cb2d268656af72cd9f84dcded /lldb/source/Commands/CommandObjectCommands.cpp | |
parent | 3b4c30b7e77edb76da538fb4989957a219c6438f (diff) | |
download | llvm-078551c7b1b9ea71e32b0c9f87fb547d9f3ed9c7.zip llvm-078551c7b1b9ea71e32b0c9f87fb547d9f3ed9c7.tar.gz llvm-078551c7b1b9ea71e32b0c9f87fb547d9f3ed9c7.tar.bz2 |
<rdar://problem/13831149>
Recursive commands invocations are not currently supported by our CommandInterpreter
CommandScriptImport can actually be made to invoke itself recursively, so we need to work around that by clearing the m_exe_ctx
This is a short-term workaround, a more interesting solution would be to actually make sure recursive command invocations work properly
llvm-svn: 181537
Diffstat (limited to 'lldb/source/Commands/CommandObjectCommands.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectCommands.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lldb/source/Commands/CommandObjectCommands.cpp b/lldb/source/Commands/CommandObjectCommands.cpp index 75bcfc2..278fdc0 100644 --- a/lldb/source/Commands/CommandObjectCommands.cpp +++ b/lldb/source/Commands/CommandObjectCommands.cpp @@ -1397,6 +1397,13 @@ protected: Error error; const bool init_session = true; + // FIXME: this is necessary because CommandObject::CheckRequirements() assumes that + // commands won't ever be recursively invoked, but it's actually possible to craft + // a Python script that does other "command script imports" in __lldb_init_module + // the real fix is to have recursive commands possible with a CommandInvocation object + // separate from the CommandObject itself, so that recursive command invocations + // won't stomp on each other (wrt to execution contents, options, and more) + m_exe_ctx.Clear(); if (m_interpreter.GetScriptInterpreter()->LoadScriptingModule(path.c_str(), m_options.m_allow_reload, init_session, |