mirror of
https://github.com/intel/llvm.git
synced 2026-01-20 01:58:44 +08:00
Fix issue with garbage address in .debug_line.
Summary: While emitting debug lines for a function we don't overwrite, we don't have a code section context that is needed by default writing routine. Hence we have to emit end_sequence after the last address, not at the end of section. (cherry picked from FBD3291533)
This commit is contained in:
@@ -2296,7 +2296,8 @@ void RewriteInstance::updateDebugLineInfoForNonSimpleFunctions() {
|
||||
ELF::SHT_PROGBITS,
|
||||
ELF::SHF_EXECINSTR | ELF::SHF_ALLOC);
|
||||
|
||||
if (LineTable->lookupAddressRange(Address, Function.getSize(), Results)) {
|
||||
if (LineTable->lookupAddressRange(Address, Function.getMaxSize() + 1,
|
||||
Results)) {
|
||||
for (auto RowIndex : Results) {
|
||||
const auto &Row = LineTable->Rows[RowIndex];
|
||||
BC->Ctx->setCurrentDwarfLoc(
|
||||
|
||||
Reference in New Issue
Block a user