forked from OSchip/llvm-project
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:
parent
f7e7e25b88
commit
b445f5eb7b
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue