TCF Agent: DWARF 5: fixed location list base address From DWARF 5 standard, section 2.6.2, if there is no preceding base address entry, then the applicable base address defaults to the base address of the compilation unit.
diff --git a/agent/tcf/services/dwarfexpr.c b/agent/tcf/services/dwarfexpr.c index 79c4fe7..a716c5a 100644 --- a/agent/tcf/services/dwarfexpr.c +++ b/agent/tcf/services/dwarfexpr.c
@@ -65,8 +65,8 @@ dio_EnterSection(&Unit->mDesc, Unit->mDesc.mSection, Value->mAddr - (U1_T *)Unit->mDesc.mSection->data); Offset = dio_ReadAddressX(NULL, Value->mSize); dio_ExitSection(); + Base = Unit->mObject->u.mCode.mLowPC; if (Unit->mDesc.mVersion <= 4) { - Base = Unit->mObject->u.mCode.mLowPC; if (Unit->mDesc.mAddressSize < 8) AddrMax = ((U8_T)1 << Unit->mDesc.mAddressSize * 8) - 1; if (Cache->mDebugLoc == NULL) str_exception(ERR_INV_DWARF, "Missing .debug_loc section"); dio_EnterSection(&Unit->mDesc, Cache->mDebugLoc, Offset);