Author: Jonas Devlieghere Date: 2019-12-21T22:33:02-08:00 New Revision: ba0eb7b66fd9dac7bf4883f70b65bded03a4b97a
URL: https://github.com/llvm/llvm-project/commit/ba0eb7b66fd9dac7bf4883f70b65bded03a4b97a DIFF: https://github.com/llvm/llvm-project/commit/ba0eb7b66fd9dac7bf4883f70b65bded03a4b97a.diff LOG: [lldb/ScriptInterpreter] Fix stale/bogus error messages Fix the nonsensical error messages for when breakpoint and watchpoint callbacks are not supported. Added: lldb/test/Shell/ScriptInterpreter/Lua/breakpoint_callback.test lldb/test/Shell/ScriptInterpreter/Lua/watchpoint_callback.test Modified: lldb/source/Interpreter/ScriptInterpreter.cpp Removed: ################################################################################ diff --git a/lldb/source/Interpreter/ScriptInterpreter.cpp b/lldb/source/Interpreter/ScriptInterpreter.cpp index 552661ef80ee..0ef859061ab1 100644 --- a/lldb/source/Interpreter/ScriptInterpreter.cpp +++ b/lldb/source/Interpreter/ScriptInterpreter.cpp @@ -32,14 +32,14 @@ void ScriptInterpreter::CollectDataForBreakpointCommandCallback( CommandReturnObject &result) { result.SetStatus(eReturnStatusFailed); result.AppendError( - "ScriptInterpreter::GetScriptCommands(StringList &) is not implemented."); + "This script interpreter does not support breakpoint callbacks."); } void ScriptInterpreter::CollectDataForWatchpointCommandCallback( WatchpointOptions *bp_options, CommandReturnObject &result) { result.SetStatus(eReturnStatusFailed); result.AppendError( - "ScriptInterpreter::GetScriptCommands(StringList &) is not implemented."); + "This script interpreter does not support watchpoint callbacks."); } std::string ScriptInterpreter::LanguageToString(lldb::ScriptLanguage language) { diff --git a/lldb/test/Shell/ScriptInterpreter/Lua/breakpoint_callback.test b/lldb/test/Shell/ScriptInterpreter/Lua/breakpoint_callback.test new file mode 100644 index 000000000000..4dbf286a693e --- /dev/null +++ b/lldb/test/Shell/ScriptInterpreter/Lua/breakpoint_callback.test @@ -0,0 +1,5 @@ +# REQUIRES: lua +# RUN: %lldb -s %s --script-language lua 2>&1 | FileCheck %s +b main +breakpoint command add -s lua +# CHECK: error: This script interpreter does not support breakpoint callbacks diff --git a/lldb/test/Shell/ScriptInterpreter/Lua/watchpoint_callback.test b/lldb/test/Shell/ScriptInterpreter/Lua/watchpoint_callback.test new file mode 100644 index 000000000000..c0bddbc1fdf5 --- /dev/null +++ b/lldb/test/Shell/ScriptInterpreter/Lua/watchpoint_callback.test @@ -0,0 +1,8 @@ +# REQUIRES: lua +# RUN: echo "int main() { return 0; }" | %clang_host -x c - -o %t +# RUN: %lldb -s %s --script-language lua %t 2>&1 | FileCheck %s +b main +r +watchpoint set expr 0x0 +watchpoint command add -s lua +# CHECK: error: This script interpreter does not support watchpoint callbacks _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits