[all-commits] [llvm/llvm-project] 1250a1: [lldb] Update dwim-print to support limited variab...
Dave Lee via All-commits
all-commits at lists.llvm.org
Mon Dec 2 13:55:57 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1250a1db1a378736afda389c94d2846d7a254576
https://github.com/llvm/llvm-project/commit/1250a1db1a378736afda389c94d2846d7a254576
Author: Dave Lee <davelee.com at gmail.com>
Date: 2024-12-02 (Mon, 02 Dec 2024)
Changed paths:
M lldb/source/Commands/CommandObjectDWIMPrint.cpp
M lldb/test/API/commands/dwim-print/Makefile
M lldb/test/API/commands/dwim-print/TestDWIMPrint.py
R lldb/test/API/commands/dwim-print/main.c
A lldb/test/API/commands/dwim-print/main.cpp
Log Message:
-----------
[lldb] Update dwim-print to support limited variable expression paths (#117452)
`frame variable` supports nested variable access, which the API calls "variable
expression paths". This change updates `dwim-print` to support a subset of supported
variable expression paths.
Consider the expression `a->b`. In C++, the arrow operator can be overloaded, and where
that is the case, expression evaluation must be used to evaluate it, not frame variable.
Likewise, the subscript operator can be overloaded.
To avoid those cases, this change introduces a limited support for variable expression
paths. Use of the dot operator is allowed.
Additionally, this change allows `dwim-print` to directly access children of `this` and
`self` (see AllowDirectIVarAccess). This functionality is also provided by the same
`GetValueForVariableExpressionPath` method.
rdar://104348908
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list