llvm-project/lldb/include/lldb
Michael Buch 8184b252cd [LLDB][ClangExpression] Allow expression evaluation from within C++ Lambdas
This patch adds support for evaluating expressions which reference
a captured `this` from within the context of a C++ lambda expression.
Currently LLDB doesn't provide Clang with enough information to
determine that we're inside a lambda expression and are allowed to
access variables on a captured `this`; instead Clang simply fails
to parse the expression.

There are two problems to solve here:
1. Make sure `clang::Sema` doesn't reject the expression due to an
illegal member access.
2. Materialize all the captured variables/member variables required
to evaluate the expression.

To address (1), we currently import the outer structure's AST context
onto `$__lldb_class`, making the `contextClass` and the `NamingClass`
match, a requirement by `clang::Sema::BuildPossibleImplicitMemberExpr`.

To address (2), we inject all captured variables as locals into the
expression source code.

**Testing**

* Added API test
2022-07-22 08:02:09 +01:00
..
API [trace] Add an option to save a compact trace bundle 2022-07-13 11:43:28 -07:00
Breakpoint Revert "Make hit point counts reliable for architectures that stop before evaluation." 2022-07-18 17:38:43 -07:00
Core [LLDB][NFC][Reliability] Fix uninitialized variables from Coverity scan 2022-07-20 14:50:48 -07:00
DataFormatters [LLDB][NFC][Reliability] Fix uninitialized variables from Coverity scan 2022-07-20 14:50:48 -07:00
Expression [LLDB][ClangExpression] Allow expression evaluation from within C++ Lambdas 2022-07-22 08:02:09 +01:00
Host [lldb] Add a NativeProcessProtocol::Threads() iterable 2022-06-28 21:49:16 +02:00
Initialization [lldb] Use C++11 default member initializers 2021-06-09 09:43:13 -07:00
Interpreter [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
Symbol Remove redundant return statements (NFC) 2022-07-17 15:37:46 -07:00
Target Revert "Make hit point counts reliable for architectures that stop before evaluation." 2022-07-18 17:38:43 -07:00
Utility [lldb] [llgs] Send process output asynchronously in non-stop mode 2022-07-15 17:20:39 +02:00
Version [lldb] Define LLDB_VERSION_PATCH correctly 2022-04-29 19:29:51 +02:00
lldb-defines.h [lldb] Remove the requirement for windows clients to specify -DIMPORT_LIBLLDB 2022-01-19 12:49:47 +01:00
lldb-enumerations.h [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
lldb-forward.h Reland "[LLDB][NFC] Decouple dwarf location table from DWARFExpression." 2022-07-12 10:54:24 -07:00
lldb-private-defines.h
lldb-private-enumerations.h [lldb] Refactor command option enum values (NFC) 2022-07-14 21:18:07 -07:00
lldb-private-forward.h
lldb-private-interfaces.h [NFC][lldb][trace] Rename trace session to trace bundle 2022-06-24 08:41:33 -07:00
lldb-private-types.h [LLDB][Expression] Allow instantiation of IR Entity from ValueObject 2022-07-22 08:02:08 +01:00
lldb-private.h [lldb] Make lldbVersion a full fledged library 2021-12-08 15:14:34 -08:00
lldb-public.h
lldb-types.h [trace][intelpt] Support system-wide tracing [20] - Rename some fields in the schema 2022-06-16 11:42:22 -07:00
lldb-versioning.h
module.modulemap [lldb] Update the modulemap 2022-01-20 18:28:23 -08:00