* 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
This commit is contained in:
Ingo Weinhold 2009-10-01 09:38:31 +00:00
parent 4fc4757d3d
commit 84153f2c57

View File

@ -1653,10 +1653,13 @@ status_t
DwarfStackFrameDebugInfo::_CreateArrayType(const BString& name, DwarfStackFrameDebugInfo::_CreateArrayType(const BString& name,
DIEArrayType* typeEntry, DwarfType*& _type) DIEArrayType* typeEntry, DwarfType*& _type)
{ {
TRACE_LOCALS("DwarfStackFrameDebugInfo::_CreateArrayType(\"%s\", %p)\n",
name.String(), typeEntry);
// create the base type // create the base type
DIEArrayType* baseTypeOwnerEntry = DwarfUtils::GetDIEByPredicate( DIEArrayType* baseTypeOwnerEntry = DwarfUtils::GetDIEByPredicate(
typeEntry, HasTypePredicate<DIEArrayType>()); typeEntry, HasTypePredicate<DIEArrayType>());
if (baseTypeOwnerEntry != NULL) { if (baseTypeOwnerEntry == NULL) {
WARNING("Failed to get base type for array type \"%s\"\n", WARNING("Failed to get base type for array type \"%s\"\n",
name.String()); name.String());
return B_BAD_VALUE; return B_BAD_VALUE;
@ -1664,8 +1667,11 @@ DwarfStackFrameDebugInfo::_CreateArrayType(const BString& name,
DwarfType* baseType = NULL; DwarfType* baseType = NULL;
status_t error = _CreateType(baseTypeOwnerEntry->GetType(), baseType); 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; return error;
}
Reference<Type> baseTypeReference(baseType, true); Reference<Type> baseTypeReference(baseType, true);
// create the array type // create the array type
@ -1679,7 +1685,7 @@ DwarfStackFrameDebugInfo::_CreateArrayType(const BString& name,
DIEArrayType* dimensionOwnerEntry = DwarfUtils::GetDIEByPredicate( DIEArrayType* dimensionOwnerEntry = DwarfUtils::GetDIEByPredicate(
typeEntry, HasDimensionsPredicate()); typeEntry, HasDimensionsPredicate());
if (dimensionOwnerEntry != NULL) { if (dimensionOwnerEntry == NULL) {
WARNING("Failed to get dimensions for array type \"%s\"\n", WARNING("Failed to get dimensions for array type \"%s\"\n",
name.String()); name.String());
return B_BAD_VALUE; return B_BAD_VALUE;
@ -1693,8 +1699,11 @@ DwarfStackFrameDebugInfo::_CreateArrayType(const BString& name,
// get/create the dimension type // get/create the dimension type
DwarfType* dimensionType = NULL; DwarfType* dimensionType = NULL;
status_t error = _CreateType(dimensionEntry, dimensionType); 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; return error;
}
Reference<Type> dimensionTypeReference(dimensionType, true); Reference<Type> dimensionTypeReference(dimensionType, true);
// create and add the array dimension object // create and add the array dimension object