[Lldb-commits] [PATCH] D46551: Inject only relevant local variables in the expression evaluation context

Frederic Riss via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon May 7 14:57:35 PDT 2018


friss created this revision.
friss added reviewers: jingham, clayborg.

In r259902, LLDB started injecting all the locals in every expression
evaluation. This fixed a bunch of issues, but also caused others, mostly
performance regressions on some codebases. The regressions were bad
enough that we added a setting in r274783 to control the behavior and
we have been shipping with the setting off to avoid the perf regressions.

This patch changes the logic injecting the local variables to only inject
the ones present in the expression typed by the user. The approach is
fairly simple and just scans the typed expression for every local name.
Hopefully this gives us the best of both world as it just realizes the
types of the variables really used by the expression.

Landing this requires the 2 other issues I pointed out today to be addressed
but I wanted to gather comments right away.


https://reviews.llvm.org/D46551

Files:
  packages/Python/lldbsuite/test/lang/cpp/member-and-local-vars-with-same-name/TestMembersAndLocalsWithSameName.py
  source/Expression/ExpressionSourceCode.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46551.145553.patch
Type: text/x-patch
Size: 5139 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180507/b5429ea2/attachment.bin>


More information about the lldb-commits mailing list