summaryrefslogtreecommitdiff
path: root/source/DataFormatters/ValueObjectPrinter.cpp
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2014-02-18 16:23:10 +0000
committerEd Maste <emaste@FreeBSD.org>2014-02-18 16:23:10 +0000
commit866dcdacfe59f5f448e008fe2c4cb9dfcf72b2ec (patch)
tree95cb16075f0af1b3a05b9b84eb18dda8e6c903e9 /source/DataFormatters/ValueObjectPrinter.cpp
parentde889deb2c386f2a7831befaf226e5c86685fa53 (diff)
Notes
Diffstat (limited to 'source/DataFormatters/ValueObjectPrinter.cpp')
-rw-r--r--source/DataFormatters/ValueObjectPrinter.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/DataFormatters/ValueObjectPrinter.cpp b/source/DataFormatters/ValueObjectPrinter.cpp
index 5c7f48b600bf..944d6d2d13a9 100644
--- a/source/DataFormatters/ValueObjectPrinter.cpp
+++ b/source/DataFormatters/ValueObjectPrinter.cpp
@@ -403,7 +403,6 @@ ValueObjectPrinter::ShouldPrintChildren (bool is_failed_description,
// Use a new temporary pointer depth in case we override the
// current pointer depth below...
- uint32_t curr_ptr_depth = m_ptr_depth;
if (is_ptr || is_ref)
{
@@ -413,7 +412,7 @@ ValueObjectPrinter::ShouldPrintChildren (bool is_failed_description,
if (m_valobj->GetPointerValue (&ptr_address_type) == 0)
return false;
- else if (is_ref && m_curr_depth == 0)
+ else if (is_ref && m_curr_depth == 0 && curr_ptr_depth == 0)
{
// If this is the root object (depth is zero) that we are showing
// and it is a reference, and no pointer depth has been supplied
@@ -468,7 +467,7 @@ ValueObjectPrinter::PrintChild (ValueObjectSP child_sp,
ValueObjectPrinter child_printer(child_sp.get(),
m_stream,
child_options,
- (IsPtr() || IsRef()) ? curr_ptr_depth - 1 : curr_ptr_depth,
+ (IsPtr() || IsRef()) && curr_ptr_depth >= 1 ? curr_ptr_depth - 1 : curr_ptr_depth,
m_curr_depth + 1);
child_printer.PrintValueObject();
}