Debugger: Fix program counter handling issue.
- For DWARF4, lowpc/highpc can be specified as constants in addition to addresses. Furthermore, they can also be specified such that highpc is a relative offset from lowpc rather than an absolute address. We weren't handling this case, which gcc4.8 is now using when emitting version 4 debug information. Fixes another part of #10659. There still remains a problem with regards to class/structure variables not showing up in the local variables view.
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2009-2012, Ingo Weinhold, [email protected].
|
* Copyright 2009-2012, Ingo Weinhold, [email protected].
|
||||||
* Copyright 2012-2013, Rene Gollent, [email protected].
|
* Copyright 2012-2014, Rene Gollent, [email protected].
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -351,8 +351,10 @@ DwarfImageDebugInfo::GetFunctions(const BObjectList<SymbolInfo>& symbols,
|
|||||||
if (rangeList == NULL) {
|
if (rangeList == NULL) {
|
||||||
target_addr_t lowPC = subprogramEntry->LowPC();
|
target_addr_t lowPC = subprogramEntry->LowPC();
|
||||||
target_addr_t highPC = subprogramEntry->HighPC();
|
target_addr_t highPC = subprogramEntry->HighPC();
|
||||||
if (lowPC >= highPC)
|
if (lowPC == highPC)
|
||||||
continue;
|
continue;
|
||||||
|
else if (highPC < lowPC)
|
||||||
|
highPC += lowPC;
|
||||||
|
|
||||||
rangeList = new(std::nothrow) TargetAddressRangeList(
|
rangeList = new(std::nothrow) TargetAddressRangeList(
|
||||||
TargetAddressRange(lowPC, highPC - lowPC));
|
TargetAddressRange(lowPC, highPC - lowPC));
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2009, Ingo Weinhold, [email protected].
|
* Copyright 2009, Ingo Weinhold, [email protected].
|
||||||
* Copyright 2013, Rene Gollent, [email protected].
|
* Copyright 2013-2014, Rene Gollent, [email protected].
|
||||||
* Distributed under the terms of the MIT License.
|
* 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_offset), AC_BLOCK | AC_CONSTANT | AC_REFERENCE },
|
||||||
{ ENTRY(bit_size), AC_BLOCK | AC_CONSTANT | AC_REFERENCE },
|
{ ENTRY(bit_size), AC_BLOCK | AC_CONSTANT | AC_REFERENCE },
|
||||||
{ ENTRY(stmt_list), AC_LINEPTR },
|
{ ENTRY(stmt_list), AC_LINEPTR },
|
||||||
{ ENTRY(low_pc), AC_ADDRESS },
|
{ ENTRY(low_pc), AC_ADDRESS | AC_CONSTANT | AC_REFERENCE },
|
||||||
{ ENTRY(high_pc), AC_ADDRESS },
|
{ ENTRY(high_pc), AC_ADDRESS | AC_CONSTANT | AC_REFERENCE },
|
||||||
{ ENTRY(language), AC_CONSTANT },
|
{ ENTRY(language), AC_CONSTANT },
|
||||||
{ ENTRY(discr), AC_REFERENCE },
|
{ ENTRY(discr), AC_REFERENCE },
|
||||||
{ ENTRY(discr_value), AC_CONSTANT },
|
{ ENTRY(discr_value), AC_CONSTANT },
|
||||||
|
|||||||
Reference in New Issue
Block a user