Debugger: Partly rework hrev46696.
- Various other places in Debugger expect the highpc attribute to be an address rather than an offset. As such, resolve it to one when setting the attribute in the corresponding DIE so the resolved value is available everywhere. Fixes variable scopes not being computed properly, and consequently the missing variables mentioned in the previous commit. This gets things working properly again under gcc4.8.
This commit is contained in:
@@ -351,10 +351,8 @@ DwarfImageDebugInfo::GetFunctions(const BObjectList<SymbolInfo>& symbols,
|
||||
if (rangeList == NULL) {
|
||||
target_addr_t lowPC = subprogramEntry->LowPC();
|
||||
target_addr_t highPC = subprogramEntry->HighPC();
|
||||
if (lowPC == highPC)
|
||||
if (highPC <= lowPC)
|
||||
continue;
|
||||
else if (highPC < lowPC)
|
||||
highPC += lowPC;
|
||||
|
||||
rangeList = new(std::nothrow) TargetAddressRangeList(
|
||||
TargetAddressRange(lowPC, highPC - lowPC));
|
||||
|
||||
@@ -115,6 +115,9 @@ DIECompileUnitBase::AddAttribute_high_pc(uint16 attributeName,
|
||||
const AttributeValue& value)
|
||||
{
|
||||
fHighPC = value.address;
|
||||
if (fLowPC != 0 && fHighPC < fLowPC)
|
||||
fHighPC += fLowPC;
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
@@ -999,6 +1002,9 @@ DIELexicalBlock::AddAttribute_high_pc(uint16 attributeName,
|
||||
const AttributeValue& value)
|
||||
{
|
||||
fHighPC = value.address;
|
||||
if (fLowPC != 0 && fHighPC < fLowPC)
|
||||
fHighPC += fLowPC;
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
@@ -1948,6 +1954,9 @@ DIESubprogram::AddAttribute_high_pc(uint16 attributeName,
|
||||
const AttributeValue& value)
|
||||
{
|
||||
fHighPC = value.address;
|
||||
if (fLowPC != 0 && fHighPC < fLowPC)
|
||||
fHighPC += fLowPC;
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user