[Lldb-commits] [PATCH] D138259: Add the ability to see when a type in incomplete.
Greg Clayton via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Nov 21 11:32:25 PST 2022
clayborg added a comment.
In D138259#3941465 <https://reviews.llvm.org/D138259#3941465>, @labath wrote:
> In D138259#3941431 <https://reviews.llvm.org/D138259#3941431>, @clayborg wrote:
>
>> "a type should be complete but isn't and you are losing information that should have been available for you to debug".
>
> I agree, but there are still two (or more) ways to communicate that information.
>
> 1. "this type is complete" + "actually, I'm just missing the debug info and pretending it's complete"
> 2. "this type is incomplete" + "it is incomplete because I am missing its debug info"
>
> My question is which method would be more useful to the user.
Gotcha. We could change "bool SBType::IsTypeComplete()" to return false, and then add a new:
bool SBType::ShouldBeComplete();
That would return true if IsTypeComplete() returned false because it was forcefully completed.
The main issue with doing it this way is if you ask if type if it is complete by calling "bool SBType::IsTypeComplete()", you will force the type to complete itself to be able to answer the question. Right now if you have a GUI debugger and you just show the top level variables, we never need to complete any of the types unless the user turns them open in the GUI. The main reason for this API in SBType is for GUI debuggers to be able to indicate there is a problem to the user, but we don't want it to cause the debugger to realize types when it doesn't need to. The current IsTypeForcefullyCompleted() won't need to complete the type in order to figure out the result.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138259/new/
https://reviews.llvm.org/D138259
More information about the lldb-commits
mailing list