diff options
Diffstat (limited to 'lldb/source/Core/Debugger.cpp')
-rw-r--r-- | lldb/source/Core/Debugger.cpp | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp index 45c2b0578f2..2be1dbbafa0 100644 --- a/lldb/source/Core/Debugger.cpp +++ b/lldb/source/Core/Debugger.cpp @@ -1801,6 +1801,24 @@ FormatPromptRecurse } } } + else if (::strncmp(var_name_begin, "script:", strlen("script:")) == 0) + { + var_name_begin += ::strlen("script:"); + std::string script_name(var_name_begin,var_name_end); + ScriptInterpreter* script_interpreter = process->GetTarget().GetDebugger().GetCommandInterpreter().GetScriptInterpreter(); + if (script_interpreter) + { + std::string script_output; + Error script_error; + if (script_interpreter->RunScriptFormatKeyword(script_name.c_str(), process,script_output,script_error) && script_error.Success()) + { + s.Printf("%s", script_output.c_str()); + var_success = true; + } + else + s.Printf("<error: %s>",script_error.AsCString()); + } + } } } } @@ -1870,6 +1888,24 @@ FormatPromptRecurse } } } + else if (::strncmp(var_name_begin, "script:", strlen("script:")) == 0) + { + var_name_begin += ::strlen("script:"); + std::string script_name(var_name_begin,var_name_end); + ScriptInterpreter* script_interpreter = thread->GetProcess()->GetTarget().GetDebugger().GetCommandInterpreter().GetScriptInterpreter(); + if (script_interpreter) + { + std::string script_output; + Error script_error; + if (script_interpreter->RunScriptFormatKeyword(script_name.c_str(), thread,script_output,script_error) && script_error.Success()) + { + s.Printf("%s", script_output.c_str()); + var_success = true; + } + else + s.Printf("<error: %s>",script_error.AsCString()); + } + } } } } @@ -1911,6 +1947,24 @@ FormatPromptRecurse var_success = true; } } + else if (::strncmp(var_name_begin, "script:", strlen("script:")) == 0) + { + var_name_begin += ::strlen("script:"); + std::string script_name(var_name_begin,var_name_end); + ScriptInterpreter* script_interpreter = target->GetDebugger().GetCommandInterpreter().GetScriptInterpreter(); + if (script_interpreter) + { + std::string script_output; + Error script_error; + if (script_interpreter->RunScriptFormatKeyword(script_name.c_str(), target,script_output,script_error) && script_error.Success()) + { + s.Printf("%s", script_output.c_str()); + var_success = true; + } + else + s.Printf("<error: %s>",script_error.AsCString()); + } + } } } break; @@ -2018,6 +2072,24 @@ FormatPromptRecurse } } } + else if (::strncmp(var_name_begin, "script:", strlen("script:")) == 0) + { + var_name_begin += ::strlen("script:"); + std::string script_name(var_name_begin,var_name_end); + ScriptInterpreter* script_interpreter = frame->GetThread()->GetProcess()->GetTarget().GetDebugger().GetCommandInterpreter().GetScriptInterpreter(); + if (script_interpreter) + { + std::string script_output; + Error script_error; + if (script_interpreter->RunScriptFormatKeyword(script_name.c_str(), frame,script_output,script_error) && script_error.Success()) + { + s.Printf("%s", script_output.c_str()); + var_success = true; + } + else + s.Printf("<error: %s>",script_error.AsCString()); + } + } } } } |