Propagate command interpreter errors from lldlbinit
authorJonas Devlieghere <jonas@devlieghere.com>
Wed, 8 May 2019 01:23:47 +0000 (01:23 +0000)
committerJonas Devlieghere <jonas@devlieghere.com>
Wed, 8 May 2019 01:23:47 +0000 (01:23 +0000)
commitc0b48ab6318026121241f90430b337ea2c7ee384
treeb1d98c9625043e167c8453730ada76b5b34763f5
parentba670b404e3f05f7c9b9cf483bca89f647a74957
Propagate command interpreter errors from lldlbinit

This patch ensures that we propagate errors coming from the lldbinit
file trough the command/script interpreter. Before, if you did something
like command script import syntax_error.py, and the python file
contained a syntax error, lldb wouldn't tell you about it. This changes
with the current patch: errors are now propagated by default.

PS: Jim authored this change and I added testing.

Differential revision: https://reviews.llvm.org/D61579

llvm-svn: 360216
lldb/include/lldb/Interpreter/CommandInterpreter.h
lldb/lit/Driver/Inputs/.lldbinit
lldb/lit/Driver/Inputs/syntax_error.py [new file with mode: 0644]
lldb/lit/Driver/LocalLLDBInit.test
lldb/source/Breakpoint/BreakpointOptions.cpp
lldb/source/Commands/CommandObjectBugreport.cpp
lldb/source/Commands/CommandObjectCommands.cpp
lldb/source/Commands/CommandObjectSettings.cpp
lldb/source/Commands/CommandObjectWatchpointCommand.cpp
lldb/source/Interpreter/CommandInterpreter.cpp
lldb/source/Target/Target.cpp