[all-commits] [llvm/llvm-project] 15cd71: [lldb] Make ValueObject::Dereference less aggressi...
Pavel Labath via All-commits
all-commits at lists.llvm.org
Mon Apr 28 23:27:40 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 15cd71afd24437d9480aff41de61b3edf739408b
https://github.com/llvm/llvm-project/commit/15cd71afd24437d9480aff41de61b3edf739408b
Author: Pavel Labath <pavel at labath.sk>
Date: 2025-04-29 (Tue, 29 Apr 2025)
Changed paths:
M lldb/source/Target/StackFrame.cpp
M lldb/source/ValueObject/ValueObject.cpp
Log Message:
-----------
[lldb] Make ValueObject::Dereference less aggressive (#137311)
The function was always trying to dereference both the synthetic and
non-synthetic view of the object. This is wrong as the caller should be
able to determine which view of the object it wants to access, as is
done e.g. for child member access.
This patch removes the nonsynthetic->synthetic fallback, which is the
more surprising path, and fixes the callers to try both versions of the
object (when appropriate). I also snuck in simplification of the member
access code path because it was possible to use the same helper function
for that, and I wanted to be sure I understand the logic correctly.
I've left the synthetic->nonsynthetic fallback in place. I think we may
want to keep that one as we often have synthetic child providers for
pointer types. They usually don't provide an explicit dereference
operation but I think users would expect that a dereference operation on
those objects would work. What we may want to do is to try the
*synthetic* operation first in this case, so that the nonsynthetic case
is really a fallback.
---------
Co-authored-by: Ilia Kuklin <kuklin.iy at mail.ru>
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