diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-03-09 00:10:52 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-03-09 00:10:52 +0000 |
commit | c5bfa3dafb3e7ccc871734a96b7a9188868d925a (patch) | |
tree | 9c5d2d797435bdfbdfad48f8f8be1f36725ae4d0 /lldb/source/Expression/REPL.cpp | |
parent | cee6c47a62c4d043c00eed860dc3900ad180b067 (diff) | |
download | bcm5719-llvm-c5bfa3dafb3e7ccc871734a96b7a9188868d925a.tar.gz bcm5719-llvm-c5bfa3dafb3e7ccc871734a96b7a9188868d925a.zip |
Break cycle lldb/Commands [3->] lldb/Expression [1->] lldb/Commands
Inspired by Zachary's mail on lldb-dev, this seemed like low hanging
fruit. This patch breaks the circular dependency between commands and
expression.
Differential revision: https://reviews.llvm.org/D59158
llvm-svn: 355762
Diffstat (limited to 'lldb/source/Expression/REPL.cpp')
-rw-r--r-- | lldb/source/Expression/REPL.cpp | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/lldb/source/Expression/REPL.cpp b/lldb/source/Expression/REPL.cpp index 8bc74e4ebdd..b3f4307bee0 100644 --- a/lldb/source/Expression/REPL.cpp +++ b/lldb/source/Expression/REPL.cpp @@ -15,7 +15,6 @@ #include "lldb/Host/HostInfo.h" #include "lldb/Interpreter/CommandInterpreter.h" #include "lldb/Interpreter/CommandReturnObject.h" -#include "lldb/Target/Target.h" #include "lldb/Target/Thread.h" #include "lldb/Utility/AnsiTerminal.h" @@ -29,12 +28,6 @@ REPL::REPL(LLVMCastKind kind, Target &target) : m_target(target), m_kind(kind) { auto exe_ctx = debugger.GetCommandInterpreter().GetExecutionContext(); m_format_options.OptionParsingStarting(&exe_ctx); m_varobj_options.OptionParsingStarting(&exe_ctx); - m_command_options.OptionParsingStarting(&exe_ctx); - - // Default certain settings for REPL regardless of the global settings. - m_command_options.unwind_on_error = false; - m_command_options.ignore_breakpoints = false; - m_command_options.debug = false; } REPL::~REPL() = default; @@ -276,22 +269,15 @@ void REPL::IOHandlerInputComplete(IOHandler &io_handler, std::string &code) { const bool colorize_err = error_sp->GetFile().GetIsTerminalWithColors(); - EvaluateExpressionOptions expr_options; + EvaluateExpressionOptions expr_options = m_expr_options; expr_options.SetCoerceToId(m_varobj_options.use_objc); - expr_options.SetUnwindOnError(m_command_options.unwind_on_error); - expr_options.SetIgnoreBreakpoints(m_command_options.ignore_breakpoints); expr_options.SetKeepInMemory(true); expr_options.SetUseDynamic(m_varobj_options.use_dynamic); - expr_options.SetTryAllThreads(m_command_options.try_all_threads); expr_options.SetGenerateDebugInfo(true); expr_options.SetREPLEnabled(true); expr_options.SetColorizeErrors(colorize_err); expr_options.SetPoundLine(m_repl_source_path.c_str(), m_code.GetSize() + 1); - if (m_command_options.timeout > 0) - expr_options.SetTimeout(std::chrono::microseconds(m_command_options.timeout)); - else - expr_options.SetTimeout(llvm::None); expr_options.SetLanguage(GetLanguage()); |