[Lldb-commits] [PATCH] D63240: [Core] Generalize ValueObject::IsRuntimeSupportValue
Adrian Prantl via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Jun 26 11:40:28 PDT 2019
aprantl added inline comments.
================
Comment at: source/Core/ValueObject.cpp:1706-1708
+ for (auto *runtime : process->GetLanguageRuntimes()) {
+ if (runtime->IsWhitelistedRuntimeValue(GetName()))
+ return false;
----------------
jingham wrote:
> clayborg wrote:
> > davide wrote:
> > > clayborg wrote:
> > > > Still seems weird that any language can white list a variable by name. Say swift has a variable named "this" which is truly should be hidden and is marked as artificial, we will always show it...
> > > Swift has no `this`, it has `self`. And yes, there are many places in the debugger where `self` is mentioned explicitly by name and has special handling. Also, I think we want to show it, most of the times.
> > Exactly Davide. **Any** language can whitelist **any** variable they want for **any** other language regardless of the language of origin of the current ValueObject.
> I agree with Greg. Otherwise various languages are going to fight about their respective white lists. We should really get the ValueObject's runtime language with ValueObject::GetObjectRuntimeLanguage() and then asking that runtime.
That's true, but in practice not likely a big problem, since you'd, e.g., need to have an *artificial* variable called `self` in C++ for this to surface.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63240/new/
https://reviews.llvm.org/D63240
More information about the lldb-commits
mailing list