[lldb] Unconditionally increment depth when printing children
authorAugusto Noronha <augusto2112@me.com>
Thu, 1 Jun 2023 23:56:56 +0000 (16:56 -0700)
committerAugusto Noronha <augusto2112@me.com>
Thu, 8 Jun 2023 20:30:30 +0000 (13:30 -0700)
commitb1ebfc5de34ef4c91aa6f163989de600fb5227f8
tree849d812ddbc210d40a36a562bbfc2b0049b0de57
parentc16b7e54ac5b4da05c1d19e350ee8e75bf5f8980
[lldb] Unconditionally increment depth when printing children

The `target.max-children-depth` setting and `--depth` flag would be
ignored if treating pointer as arrays, fix that by always incrementing
the current depth when printing a new child.

rdar://109855463

Differential Revision: https://reviews.llvm.org/D151950
lldb/include/lldb/DataFormatters/DumpValueObjectOptions.h
lldb/source/DataFormatters/ValueObjectPrinter.cpp
lldb/test/API/lang/cpp/frame-var-depth-and-elem-count/Makefile [new file with mode: 0644]
lldb/test/API/lang/cpp/frame-var-depth-and-elem-count/TestFrameVarDepthAndElemCount.py [new file with mode: 0644]
lldb/test/API/lang/cpp/frame-var-depth-and-elem-count/main.cpp [new file with mode: 0644]