[Lldb-commits] [lldb] [lldb] Update dwim-print to show expanded objc instances (PR #117500)

via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 13 14:03:27 PDT 2025


jimingham wrote:

If the result of `frame var` is 30 pointer variables, I would not be happy if that went from 30 lines I could parse and find the variable I was interested in to 30 x num_ivars lines, and now I've got many pages of much more noisy output to scan.

When I'm listing multiple variables, I'm doing so because I want to be able to scan them in totality, not dive into one of them.  I definitely would not want this feature when more than one top level variable was being printed.  For the same reason, I would definitely not want to do this for any contained objects, just top level vars.

It would be less disruptive if we did this when printing only ONE variable.  It would be weird to have `v`  the children in `v array_of_nsobjects` look quite different from `v foo` shows?  The collection one would be fairly easy to understand, the difference between `v` and `v foo` is a little odder, though people could get used to this.

We also have to make sure that we don't end up expanding variables that people have summaries for, and consequently don't need or want to see the children.  Type summaries currently have --expand off by default, and we do want to preserver that behavior.

https://github.com/llvm/llvm-project/pull/117500


More information about the lldb-commits mailing list