From 84153f2c5717e591329782c5178ea084fb447e96 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Thu, 1 Oct 2009 09:38:31 +0000 Subject: [PATCH] * Fixed typos in comparisons. * Some more output on error. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33394 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../debug_info/DwarfStackFrameDebugInfo.cpp | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/apps/debugger/debug_info/DwarfStackFrameDebugInfo.cpp b/src/apps/debugger/debug_info/DwarfStackFrameDebugInfo.cpp index fe8783f635..c81b361897 100644 --- a/src/apps/debugger/debug_info/DwarfStackFrameDebugInfo.cpp +++ b/src/apps/debugger/debug_info/DwarfStackFrameDebugInfo.cpp @@ -1653,10 +1653,13 @@ status_t DwarfStackFrameDebugInfo::_CreateArrayType(const BString& name, DIEArrayType* typeEntry, DwarfType*& _type) { + TRACE_LOCALS("DwarfStackFrameDebugInfo::_CreateArrayType(\"%s\", %p)\n", + name.String(), typeEntry); + // create the base type DIEArrayType* baseTypeOwnerEntry = DwarfUtils::GetDIEByPredicate( typeEntry, HasTypePredicate()); - if (baseTypeOwnerEntry != NULL) { + if (baseTypeOwnerEntry == NULL) { WARNING("Failed to get base type for array type \"%s\"\n", name.String()); return B_BAD_VALUE; @@ -1664,8 +1667,11 @@ DwarfStackFrameDebugInfo::_CreateArrayType(const BString& name, DwarfType* baseType = NULL; status_t error = _CreateType(baseTypeOwnerEntry->GetType(), baseType); - if (error != B_OK) + if (error != B_OK) { + WARNING("Failed to create base type for array type \"%s\": %s\n", + name.String(), strerror(error)); return error; + } Reference baseTypeReference(baseType, true); // create the array type @@ -1679,7 +1685,7 @@ DwarfStackFrameDebugInfo::_CreateArrayType(const BString& name, DIEArrayType* dimensionOwnerEntry = DwarfUtils::GetDIEByPredicate( typeEntry, HasDimensionsPredicate()); - if (dimensionOwnerEntry != NULL) { + if (dimensionOwnerEntry == NULL) { WARNING("Failed to get dimensions for array type \"%s\"\n", name.String()); return B_BAD_VALUE; @@ -1693,8 +1699,11 @@ DwarfStackFrameDebugInfo::_CreateArrayType(const BString& name, // get/create the dimension type DwarfType* dimensionType = NULL; status_t error = _CreateType(dimensionEntry, dimensionType); - if (error != B_OK) + if (error != B_OK) { + WARNING("Failed to create type for array dimension: %s\n", + strerror(error)); return error; + } Reference dimensionTypeReference(dimensionType, true); // create and add the array dimension object