teak-llvm/lldb/packages/Python/lldbsuite/test/expression_command
Aleksandr Urakov 40624a085c [Expressions] Add support of expressions evaluation in some object's context
Summary:
This patch adds support of expression evaluation in a context of some object.
Consider the following example:
```
struct S {
  int a = 11;
  int b = 12;
};

int main() {
  S s;
  int a = 1;
  int b = 2;
  // We have stopped here
  return 0;
}
```
This patch allows to do something like that:
```
lldb.frame.FindVariable("s").EvaluateExpression("a + b")
```
and the result will be `33` (not `3`) because fields `a` and `b` of `s` will be
used (not locals `a` and `b`).

This is achieved by replacing of `this` type and object for the expression. This
has some limitations: an expression can be evaluated only for values located in
the debuggee process memory (they must have an address of `eAddressTypeLoad`
type).

Reviewers: teemperor, clayborg, jingham, zturner, labath, davide, spyffe, serge-sans-paille

Reviewed By: jingham

Subscribers: abidh, lldb-commits, leonid.mashinskiy

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D55318

llvm-svn: 353149
2019-02-05 09:14:36 +00:00
..
anonymous-struct [lldbsuite] Un-xfail tests on Windows that are now passing 2018-12-19 19:04:01 +00:00
calculator_mode
call-function [test] Remove flakiness decorator from TestObjCDynamicSBType 2018-12-30 06:10:03 +00:00
call-overridden-method [lit, lldbsuite] Disable tests that are failing because of pr21765 and pr24489 2018-05-17 16:58:00 +00:00
call-restarts Fix whitespace in the python test suite. 2018-07-27 22:20:59 +00:00
call-throws Fix whitespace in the python test suite. 2018-07-27 22:20:59 +00:00
char [lldbsuite] Un-xfail tests on Windows that are now passing (pt.2) 2018-12-19 19:10:25 +00:00
class_template_specialization_empty_pack Fix handling of CreateTemplateParameterList when there is an empty pack 2019-01-30 21:48:56 +00:00
completion [lldbsuite] Un-xfail tests on Windows that are now passing 2018-12-19 19:04:01 +00:00
context-object [Expressions] Add support of expressions evaluation in some object's context 2019-02-05 09:14:36 +00:00
context-object-objc [Expressions] Add support of expressions evaluation in some object's context 2019-02-05 09:14:36 +00:00
dont_allow_jit [lldbsuite] Un-xfail tests on Windows that are now passing (pt.2) 2018-12-19 19:10:25 +00:00
expr-in-syscall Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
fixits Fix whitespace in the python test suite. 2018-07-27 22:20:59 +00:00
formatters Remove header grouping comments. 2018-11-11 23:17:06 +00:00
ir-interpreter IRInterpreter: fix sign extension of small types (pr37840) 2018-06-20 10:45:29 +00:00
ir-interpreter-phi-nodes Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
issue_11588 Fix whitespace in the python test suite. 2018-07-27 22:20:59 +00:00
macros Working through testcases, converting to run_to_source_breakpoint. 2017-07-06 18:06:25 +00:00
options [Expr] Fix TestExprOptions after r348240 on MacOS X 2018-12-04 11:08:02 +00:00
persist_objc_pointeetype Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
persistent_ptr_update Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
persistent_types Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
persistent_variables Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
po_verbosity Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
pr35310 [lldbsuite] Un-xfail tests on Windows that are now passing (pt.2) 2018-12-19 19:10:25 +00:00
radar_8638051 Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
radar_9531204 Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
radar_9673664 Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
rdar42038760 [IRInterpreter] Fix misevaluation of interpretation expressions with urem. 2018-07-12 00:31:04 +00:00
rdar44436068 Don't run TestBreakpointThumbCodesection.py on darwin systems; 2019-01-17 22:26:25 +00:00
save_jit_objects Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
scoped_enums Rename test directory 2019-01-24 18:24:17 +00:00
test [lldbsuite] Un-xfail tests on Windows that are now passing (pt.2) 2018-12-19 19:10:25 +00:00
timeout Working through testcases, converting to run_to_source_breakpoint. 2017-07-06 18:06:25 +00:00
top-level Compile the LLDB tests out-of-tree. 2018-01-30 18:29:16 +00:00
two-files Wrap all references to build artifacts in the LLDB testsuite (NFC) 2018-01-19 23:24:35 +00:00
unwind_expression [lldbsuite] Un-xfail tests on Windows that are now passing (pt.4) 2018-12-20 01:25:35 +00:00
xvalue Fix whitespace in the python test suite. 2018-07-27 22:20:59 +00:00
.categories