[Lldb-commits] [PATCH] D151950: [lldb] Unconditionally increment depth when printing children
Augusto Noronha via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Jun 1 17:05:14 PDT 2023
augusto2112 updated this revision to Diff 527670.
augusto2112 added a comment.
Herald added a subscriber: JDevlieghere.
Add radar
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151950/new/
https://reviews.llvm.org/D151950
Files:
lldb/source/DataFormatters/ValueObjectPrinter.cpp
Index: lldb/source/DataFormatters/ValueObjectPrinter.cpp
===================================================================
--- lldb/source/DataFormatters/ValueObjectPrinter.cpp
+++ lldb/source/DataFormatters/ValueObjectPrinter.cpp
@@ -590,7 +590,7 @@
void ValueObjectPrinter::PrintChild(
ValueObjectSP child_sp,
const DumpValueObjectOptions::PointerDepth &curr_ptr_depth) {
- const uint32_t consumed_depth = (!m_options.m_pointer_as_array) ? 1 : 0;
+ const uint32_t consumed_depth = m_options.m_pointer_as_array ? 0 : 1;
const bool does_consume_ptr_depth =
((IsPtr() && !m_options.m_pointer_as_array) || IsRef());
@@ -611,7 +611,7 @@
ValueObjectPrinter child_printer(
child_sp.get(), m_stream, child_options,
does_consume_ptr_depth ? --curr_ptr_depth : curr_ptr_depth,
- m_curr_depth + consumed_depth, m_printed_instance_pointers);
+ m_curr_depth + 1, m_printed_instance_pointers);
child_printer.PrintValueObject();
}
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151950.527670.patch
Type: text/x-patch
Size: 993 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230602/59fa82ed/attachment-0001.bin>
More information about the lldb-commits
mailing list