diff options
| author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-04-26 22:43:16 +0000 |
|---|---|---|
| committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-04-26 22:43:16 +0000 |
| commit | 2b29b432d206ee706538b8dad54806d7649fb378 (patch) | |
| tree | c1c288a9ee56edb568e0f4eb8925b5215ee50c97 /lldb/source/API | |
| parent | 3bf116c1a4f88d6e3f3fd0887453dea3569e0823 (diff) | |
| download | bcm5719-llvm-2b29b432d206ee706538b8dad54806d7649fb378.tar.gz bcm5719-llvm-2b29b432d206ee706538b8dad54806d7649fb378.zip | |
[ScriptInterpreter] Move ownership into debugger (NFC)
This is part two of the change started in r359330. This patch moves the
ownership of the script interpreter from the command interpreter into
the debugger. I would've preferred to remove the lazy initialization,
however the fact that the scripting language is set after the debugger
is created makes that tricky. So for now this does exactly the same
thing as when it was under the command interpreter. The result is that
this patch is fully NFC.
Differential revision: https://reviews.llvm.org/D61211
llvm-svn: 359354
Diffstat (limited to 'lldb/source/API')
| -rw-r--r-- | lldb/source/API/SBBreakpoint.cpp | 2 | ||||
| -rw-r--r-- | lldb/source/API/SBBreakpointLocation.cpp | 2 | ||||
| -rw-r--r-- | lldb/source/API/SBBreakpointName.cpp | 2 | ||||
| -rw-r--r-- | lldb/source/API/SBTypeCategory.cpp | 4 |
4 files changed, 2 insertions, 8 deletions
diff --git a/lldb/source/API/SBBreakpoint.cpp b/lldb/source/API/SBBreakpoint.cpp index b97bb0f84b2..45eaea6b618 100644 --- a/lldb/source/API/SBBreakpoint.cpp +++ b/lldb/source/API/SBBreakpoint.cpp @@ -602,7 +602,6 @@ void SBBreakpoint::SetScriptCallbackFunction( BreakpointOptions *bp_options = bkpt_sp->GetOptions(); bkpt_sp->GetTarget() .GetDebugger() - .GetCommandInterpreter() .GetScriptInterpreter() ->SetBreakpointCommandCallbackFunction(bp_options, callback_function_name); @@ -623,7 +622,6 @@ SBError SBBreakpoint::SetScriptCallbackBody(const char *callback_body_text) { Status error = bkpt_sp->GetTarget() .GetDebugger() - .GetCommandInterpreter() .GetScriptInterpreter() ->SetBreakpointCommandCallback(bp_options, callback_body_text); sb_error.SetError(error); diff --git a/lldb/source/API/SBBreakpointLocation.cpp b/lldb/source/API/SBBreakpointLocation.cpp index f3ee8201afd..56068750709 100644 --- a/lldb/source/API/SBBreakpointLocation.cpp +++ b/lldb/source/API/SBBreakpointLocation.cpp @@ -220,7 +220,6 @@ void SBBreakpointLocation::SetScriptCallbackFunction( loc_sp->GetBreakpoint() .GetTarget() .GetDebugger() - .GetCommandInterpreter() .GetScriptInterpreter() ->SetBreakpointCommandCallbackFunction(bp_options, callback_function_name); @@ -243,7 +242,6 @@ SBBreakpointLocation::SetScriptCallbackBody(const char *callback_body_text) { loc_sp->GetBreakpoint() .GetTarget() .GetDebugger() - .GetCommandInterpreter() .GetScriptInterpreter() ->SetBreakpointCommandCallback(bp_options, callback_body_text); sb_error.SetError(error); diff --git a/lldb/source/API/SBBreakpointName.cpp b/lldb/source/API/SBBreakpointName.cpp index 63439a1f890..1c794fca8ca 100644 --- a/lldb/source/API/SBBreakpointName.cpp +++ b/lldb/source/API/SBBreakpointName.cpp @@ -579,7 +579,6 @@ void SBBreakpointName::SetScriptCallbackFunction( BreakpointOptions &bp_options = bp_name->GetOptions(); m_impl_up->GetTarget() ->GetDebugger() - .GetCommandInterpreter() .GetScriptInterpreter() ->SetBreakpointCommandCallbackFunction(&bp_options, callback_function_name); @@ -603,7 +602,6 @@ SBBreakpointName::SetScriptCallbackBody(const char *callback_body_text) { Status error = m_impl_up->GetTarget() ->GetDebugger() - .GetCommandInterpreter() .GetScriptInterpreter() ->SetBreakpointCommandCallback(&bp_options, callback_body_text); sb_error.SetError(error); diff --git a/lldb/source/API/SBTypeCategory.cpp b/lldb/source/API/SBTypeCategory.cpp index a41b02acf68..c2ec8cf8522 100644 --- a/lldb/source/API/SBTypeCategory.cpp +++ b/lldb/source/API/SBTypeCategory.cpp @@ -425,7 +425,7 @@ bool SBTypeCategory::AddTypeSummary(SBTypeNameSpecifier type_name, DebuggerSP debugger_sp = lldb_private::Debugger::GetDebuggerAtIndex(j); if (debugger_sp) { ScriptInterpreter *interpreter_ptr = - debugger_sp->GetCommandInterpreter().GetScriptInterpreter(); + debugger_sp->GetScriptInterpreter(); if (interpreter_ptr) { std::string output; if (interpreter_ptr->GenerateTypeScriptFunction(input, output, @@ -549,7 +549,7 @@ bool SBTypeCategory::AddTypeSynthetic(SBTypeNameSpecifier type_name, DebuggerSP debugger_sp = lldb_private::Debugger::GetDebuggerAtIndex(j); if (debugger_sp) { ScriptInterpreter *interpreter_ptr = - debugger_sp->GetCommandInterpreter().GetScriptInterpreter(); + debugger_sp->GetScriptInterpreter(); if (interpreter_ptr) { std::string output; if (interpreter_ptr->GenerateTypeSynthClass(input, output, |

