aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRene Gollent <anevilyak@gmail.com>2012-07-21 17:27:13 -0400
committerRene Gollent <anevilyak@gmail.com>2012-07-21 17:34:31 -0400
commit55d6e32c7d1d4e62bfee83d36142ca0953fda0dc (patch)
treebe8cd8fae54c17b59c559345cef0413bcd9c2170
parent7050e3cd84cbf0bfdbe4aee9406a9c7240de6e5c (diff)
Fix name generation for void pointer parameters.hrev44377
-rw-r--r--src/apps/debugger/dwarf/DwarfUtils.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/apps/debugger/dwarf/DwarfUtils.cpp b/src/apps/debugger/dwarf/DwarfUtils.cpp
index 233a41ca13..f32816101e 100644
--- a/src/apps/debugger/dwarf/DwarfUtils.cpp
+++ b/src/apps/debugger/dwarf/DwarfUtils.cpp
@@ -1,6 +1,6 @@
/*
* Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de.
- * Copyright 2011, Rene Gollent, rene@gollent.com.
+ * Copyright 2011-2012, Rene Gollent, rene@gollent.com.
* Distributed under the terms of the MIT License.
*/
@@ -102,7 +102,7 @@ DwarfUtils::GetFullDIEName(const DebugInfoEntry* entry, BString& _name)
type)) {
DIEType* baseType = type;
while ((modifiedType = dynamic_cast<DIEModifiedType*>(
- baseType)) != NULL && modifiedType->GetType() != NULL) {
+ baseType)) != NULL) {
switch (modifiedType->Tag()) {
case DW_TAG_pointer_type:
modifier.Prepend("*");
@@ -122,7 +122,13 @@ DwarfUtils::GetFullDIEName(const DebugInfoEntry* entry, BString& _name)
type = baseType;
}
- GetFullyQualifiedDIEName(type, paramName);
+ // if the parameter has no type associated,
+ // then it's the unspecified type.
+ if (type == NULL)
+ paramName = "void";
+ else
+ GetFullyQualifiedDIEName(type, paramName);
+
if (modifier.Length() > 0) {
if (modifier[modifier.Length() - 1] == ' ')
modifier.Truncate(modifier.Length() - 1);