diff --git a/src/apps/debugger/dwarf/DwarfUtils.cpp b/src/apps/debugger/dwarf/DwarfUtils.cpp index 3b6f1d7797..67b201faa6 100644 --- a/src/apps/debugger/dwarf/DwarfUtils.cpp +++ b/src/apps/debugger/dwarf/DwarfUtils.cpp @@ -76,20 +76,25 @@ DwarfUtils::GetFullDIEName(const DebugInfoEntry* entry, BString& _name) DebugInfoEntryList::ConstIterator iterator = subProgram->Parameters().GetIterator(); - // this function is a class method, skip the first parameter - // as it supplies our 'this' pointer and shouldn't be visible - // in the signature - if (dynamic_cast(subProgram->Parent()) != NULL) - iterator.Next(); - + bool firstParameter = true; while (iterator.HasNext()) { + DebugInfoEntry* parameterEntry = iterator.Next(); + if (dynamic_cast(parameterEntry) + != NULL) { + parameters += ", ..."; + continue; + } + const DIEFormalParameter* parameter - = dynamic_cast(iterator.Next()); + = dynamic_cast(parameterEntry); if (parameter == NULL) { // this shouldn't happen return; } + if (parameter->IsArtificial()) + continue; + BString paramName; BString modifier; DIEType* type = parameter->GetType(); @@ -133,10 +138,12 @@ DwarfUtils::GetFullDIEName(const DebugInfoEntry* entry, BString& _name) paramName += modifier; } - parameters += paramName; - - if (iterator.HasNext()) + if (firstParameter) + firstParameter = false; + else parameters += ", "; + + parameters += paramName; } if (parameters.Length() > 0)