llvm-project/lldb
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
..
bindings [lldb] Use internal_dict name over dict in python examples 2021-02-10 15:11:00 -08:00
cmake [lldb] Bump the required SWIG version to 3 2021-01-08 08:47:21 -08:00
docs Use internal_dict everywhere we refer to the python session dict in docs. 2021-02-09 17:48:47 -08:00
examples [lldb] Remove LLDB session dir and just store test traces in the respective test build directory 2020-12-04 11:43:10 +01:00
include/lldb [lldb] Minor cleanups to ThreadPlan.h (NFC) 2021-02-10 13:36:38 -08:00
packages/Python [lldb/test] Automatically find debug servers to test 2021-02-11 14:43:53 +01:00
resources [lldb] Remove stale LLDB-Info.plist 2021-01-08 10:12:16 -08:00
scripts [lldb][AArch64/Linux] Show memory tagged memory regions 2020-11-20 11:21:59 +00:00
source [lldb] Fix that running a top level expression without a process fails with a cryptic error 2021-02-11 17:07:11 +01:00
test [lldb] Fix that running a top level expression without a process fails with a cryptic error 2021-02-11 17:07:11 +01:00
third_party/Python/module Revert "[lldb] temporary commit to see why a test is failing only on lldb-aarch64-ubuntu" 2020-08-05 11:55:02 +02:00
tools [debugserver] Fix more warnings in DNBArchImplARM64 2021-02-05 15:21:24 -08:00
unittests Diagnose unhandled cases in DW_OP_deref 2021-02-10 17:27:02 -08:00
utils [lldb/test] Automatically find debug servers to test 2021-02-11 14:43:53 +01:00
.clang-format
.clang-tidy [lldb] Add .clang-tidy with customization to disable readability-identifier-naming 2020-03-09 12:50:28 -07:00
.gitignore
CMakeLists.txt [CMake] Remove dead code setting policies to NEW 2021-01-19 17:19:36 +02:00
CODE_OWNERS.txt
LICENSE.TXT
use_lldb_suite_root.py