[lldb] Never print children if the max depth has been reached
authorAugusto Noronha <augusto2112@me.com>
Wed, 7 Jun 2023 23:17:37 +0000 (16:17 -0700)
committerAugusto Noronha <augusto2112@me.com>
Tue, 13 Jun 2023 18:03:04 +0000 (11:03 -0700)
commitf94c7ffe46400559740e7f81d7c60d8c0fe7df82
tree933822a49c270630625a74c3d0eaa128b7eb9948
parent894d047056a684da8b993ca4aa1bd82eddeb0113
[lldb] Never print children if the max depth has been reached

When formatting a variable, the max depth would potentially be ignored
if the current value object failed to print itself. Change that to
always respect the max depth, even if failure occurs.

rdar://109855463

Differential Revision: https://reviews.llvm.org/D152409
lldb/include/lldb/DataFormatters/ValueObjectPrinter.h
lldb/source/DataFormatters/ValueObjectPrinter.cpp
lldb/test/API/lang/cpp/frame-var-depth-and-elem-count/TestFrameVarDepthAndElemCount.py
lldb/test/API/lang/cpp/frame-var-depth-and-elem-count/main.cpp