From a9aa59ef7cac340a3e45a48cebb58b995e163ff2 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Mon, 23 Nov 2015 22:28:01 -0500 Subject: [PATCH] Debugger: Fix #12499. DebugReportGenerator/UiUtils: - When traversing the value node graph, detection of the case of an address type with a compound child wasn't taking type modifiers into account, leading to it sometimes not traversing down to members when it should, and consequently not reporting those members in a debug report. --- src/apps/debugger/controllers/DebugReportGenerator.cpp | 5 +++-- src/apps/debugger/user_interface/util/UiUtils.cpp | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/apps/debugger/controllers/DebugReportGenerator.cpp b/src/apps/debugger/controllers/DebugReportGenerator.cpp index 6f40773c61..e9cd33c24d 100644 --- a/src/apps/debugger/controllers/DebugReportGenerator.cpp +++ b/src/apps/debugger/controllers/DebugReportGenerator.cpp @@ -750,8 +750,9 @@ DebugReportGenerator::_ResolveValueIfNeeded(ValueNode* node, StackFrame* frame, // since in the case of a pointer to a compound we hide // the intervening compound, don't consider the hidden node // a level for the purposes of depth traversal - if (node->GetType()->Kind() == TYPE_ADDRESS - && child->GetType()->Kind() == TYPE_COMPOUND) { + if (node->GetType()->ResolveRawType(false)->Kind() == TYPE_ADDRESS + && child->GetType()->ResolveRawType(false)->Kind() + == TYPE_COMPOUND) { _ResolveValueIfNeeded(child->Node(), frame, maxDepth); } else _ResolveValueIfNeeded(child->Node(), frame, maxDepth - 1); diff --git a/src/apps/debugger/user_interface/util/UiUtils.cpp b/src/apps/debugger/user_interface/util/UiUtils.cpp index 064d85c614..99b4749537 100644 --- a/src/apps/debugger/user_interface/util/UiUtils.cpp +++ b/src/apps/debugger/user_interface/util/UiUtils.cpp @@ -297,8 +297,9 @@ UiUtils::PrintValueNodeGraph(BString& _output, ValueNodeChild* child, } if (node->CountChildren() == 1 - && node->GetType()->Kind() == TYPE_ADDRESS - && node->ChildAt(0)->GetType()->Kind() == TYPE_COMPOUND) { + && node->GetType()->ResolveRawType(false)->Kind() == TYPE_ADDRESS + && node->ChildAt(0)->GetType()->ResolveRawType(false)->Kind() + == TYPE_COMPOUND) { // for the case of a pointer to a compound type, // we want to hide the intervening compound node and print // the children directly.