diff --git a/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp b/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp index ba463b4824..90c4d01188 100644 --- a/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp +++ b/src/apps/debugger/debug_info/DwarfImageDebugInfo.cpp @@ -1,6 +1,6 @@ /* * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. - * Copyright 2012-2013, Rene Gollent, rene@gollent.com. + * Copyright 2012-2014, Rene Gollent, rene@gollent.com. * Distributed under the terms of the MIT License. */ @@ -351,8 +351,10 @@ DwarfImageDebugInfo::GetFunctions(const BObjectList& symbols, if (rangeList == NULL) { target_addr_t lowPC = subprogramEntry->LowPC(); target_addr_t highPC = subprogramEntry->HighPC(); - if (lowPC >= highPC) + if (lowPC == highPC) continue; + else if (highPC < lowPC) + highPC += lowPC; rangeList = new(std::nothrow) TargetAddressRangeList( TargetAddressRange(lowPC, highPC - lowPC)); diff --git a/src/apps/debugger/dwarf/AttributeClasses.cpp b/src/apps/debugger/dwarf/AttributeClasses.cpp index 801e7836f4..e326ed1425 100644 --- a/src/apps/debugger/dwarf/AttributeClasses.cpp +++ b/src/apps/debugger/dwarf/AttributeClasses.cpp @@ -1,6 +1,6 @@ /* * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. - * Copyright 2013, Rene Gollent, rene@gollent.com. + * Copyright 2013-2014, Rene Gollent, rene@gollent.com. * Distributed under the terms of the MIT License. */ @@ -49,8 +49,8 @@ static const attribute_name_info_entry kAttributeNameInfos[] = { { ENTRY(bit_offset), AC_BLOCK | AC_CONSTANT | AC_REFERENCE }, { ENTRY(bit_size), AC_BLOCK | AC_CONSTANT | AC_REFERENCE }, { ENTRY(stmt_list), AC_LINEPTR }, - { ENTRY(low_pc), AC_ADDRESS }, - { ENTRY(high_pc), AC_ADDRESS }, + { ENTRY(low_pc), AC_ADDRESS | AC_CONSTANT | AC_REFERENCE }, + { ENTRY(high_pc), AC_ADDRESS | AC_CONSTANT | AC_REFERENCE }, { ENTRY(language), AC_CONSTANT }, { ENTRY(discr), AC_REFERENCE }, { ENTRY(discr_value), AC_CONSTANT },