llvm-capstone/lldb/source
Raphael Isemann 71536fd031 [lldb] Fix that running a top level expression without a process fails with a cryptic error
Right now when running `expr --top-level -- void foo() {}`, LLDB just prints a cryptic
`error: Couldn't find $__lldb_expr() in the module` error. The reason for that is
that if we don't have a running process, we try to set our execution policy to always use the
IR interpreter (ExecutionPolicyNever) which works even without a process. However
that code didn't consider the special ExecutionPolicyTopLevel which we use for
top-level expressions. By changing the execution policy to ExecutionPolicyNever,
LLDB thinks we're actually trying to interpret a normal expression inside our
`$__lldb_expr` function and then fails when looking for it.

This just adds an exception for top-level expressions to that code and a bunch of tests.

Reviewed By: shafik

Differential Revision: https://reviews.llvm.org/D91723
2021-02-11 17:07:11 +01:00
..
API Reland "[lldb] Make CommandInterpreter's execution context the same as debugger's one" 2021-02-08 15:09:09 +03:00
Breakpoint Reland "[lldb] Make CommandInterpreter's execution context the same as debugger's one" 2021-02-08 15:09:09 +03:00
Commands [lldb] Use internal_dict name over dict in python examples 2021-02-10 15:11:00 -08:00
Core [lldb] Fix crash in FormatEntity for mangled-name 2021-02-08 18:38:08 -08:00
DataFormatters [lldb] Remove assumption from Clang-based data formatters that their types are in the scratch AST 2020-12-10 17:35:03 +01:00
Expression [lldb] Fix that running a top level expression without a process fails with a cryptic error 2021-02-11 17:07:11 +01:00
Host [lldb] [Process/FreeBSDRemote] Introduce powerpc support 2021-02-09 21:10:45 +01:00
Initialization [lldb] Abstract scoped timer logic behind LLDB_SCOPED_TIMER (NFC) 2020-12-22 09:10:27 -08:00
Interpreter [LLDB] Fix Wunused-result warning 2021-02-08 18:10:08 +01:00
Plugins [lldb] Don't emit a warning when using Objective-C getters in expressions 2021-02-11 16:48:41 +01:00
Symbol [lldb] Simplify ObjectFile::FindPlugin (NFC) 2020-12-23 14:06:40 -08:00
Target [lldb] Minor cleanups to ThreadPlan.h (NFC) 2021-02-10 13:36:38 -08:00
Utility [lldb][NFC] Minor comment and inlining fixes for Args 2021-02-05 10:17:16 +01:00
CMakeLists.txt Remove HAVE_VCS_VERSION_INC, not needed 2020-10-29 13:09:05 -07:00
lldb.cpp Remove HAVE_VCS_VERSION_INC, not needed 2020-10-29 13:09:05 -07:00