[PATCH] D72443: [DebugInfo] Improve error message text
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 9 05:59:38 PST 2020
jhenderson updated this revision to Diff 237045.
jhenderson added a comment.
Update missed test.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72443/new/
https://reviews.llvm.org/D72443
Files:
llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
llvm/test/tools/llvm-dwarfdump/X86/debug_line_invalid.test
llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
Index: llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
===================================================================
--- llvm/unittests/DebugInfo/DWARF/DWARFDebugLineTest.cpp
+++ 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);
}
Index: llvm/test/tools/llvm-dwarfdump/X86/debug_line_invalid.test
===================================================================
--- llvm/test/tools/llvm-dwarfdump/X86/debug_line_invalid.test
+++ llvm/test/tools/llvm-dwarfdump/X86/debug_line_invalid.test
@@ -161,7 +161,7 @@
# ALL-NEXT: warning: parsing line table prologue at 0x000000c8 should have ended at 0x00000103 but it ended at 0x00000102
# OTHER-NEXT: warning: unexpected line op length at offset 0x00000158 expected 0x02 found 0x01
# OTHER-NEXT: warning: unexpected line op length at offset 0x0000015c expected 0x01 found 0x02
-# OTHER-NEXT: warning: last sequence in debug line table is not terminated!
+# OTHER-NEXT: warning: last sequence in debug line table at offset 0x0000016c is not terminated
# ALL-NEXT: warning: parsing line table prologue at 0x000001b2 should have ended at 0x000001cd but it ended at 0x000001e4
# ALL-NEXT: warning: parsing line table prologue at 0x000001f2 should have ended at 0x0000021d but it ended at 0x00000224
# ALL-NEXT: warning: parsing line table prologue at 0x00000232 should have ended at 0x00000254 but it ended at 0x00000264
Index: llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
===================================================================
--- llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
+++ llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp
@@ -908,9 +908,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()) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72443.237045.patch
Type: text/x-patch
Size: 2999 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200109/a68c9c1e/attachment.bin>
More information about the llvm-commits
mailing list