diff --git a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp --- a/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp +++ b/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp @@ -907,9 +907,11 @@ } if (!State.Sequence.Empty) - RecoverableErrorCallback( - createStringError(errc::illegal_byte_sequence, - "last sequence in debug line table is not terminated!")); + RecoverableErrorCallback(createStringError( + errc::illegal_byte_sequence, + "last sequence in debug line table at offset 0x%8.8" PRIx64 + " is not terminated", + DebugLineOffset)); // Sort all sequences so that address lookup will work faster. if (!Sequences.empty()) { diff --git a/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp b/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp --- a/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp +++ b/llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp @@ -632,7 +632,8 @@ auto ExpectedLineTable = Line.getOrParseLineTable(LineData, 0, *Context, nullptr, RecordRecoverable); - checkError("last sequence in debug line table is not terminated!", + checkError("last sequence in debug line table at offset 0x00000000 is not " + "terminated", std::move(Recoverable)); ASSERT_TRUE(ExpectedLineTable.operator bool()); EXPECT_EQ((*ExpectedLineTable)->Rows.size(), 6u); @@ -791,7 +792,8 @@ Parser.parseNext(RecordRecoverable, RecordUnrecoverable); EXPECT_TRUE(Parser.done()); - checkError("last sequence in debug line table is not terminated!", + checkError("last sequence in debug line table at offset 0x00000031 is not " + "terminated", std::move(Recoverable)); EXPECT_FALSE(Unrecoverable); }