<div dir="ltr">Follow-up. The line endings were fixed by James on Feb 11, in 47f7df89461e3fd9aa1c78f12741603365f903fe</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 14, 2020 at 12:44 PM Robinson, Paul via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi James,<br>
Did this mess up the line endings of the test file?<br>
The diff makes it look like the entire file changed.<br>
--paulr<br>
<br>
> -----Original Message-----<br>
> From: llvm-commits <<a href="mailto:llvm-commits-bounces@lists.llvm.org" target="_blank">llvm-commits-bounces@lists.llvm.org</a>> On Behalf Of<br>
> James Henderson via llvm-commits<br>
> Sent: Thursday, January 2, 2020 12:06 PM<br>
> To: <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
> Subject: [llvm] 19a71e3 - [test][llvm-dwarfdump][NFC] Remove unused check<br>
> <br>
> <br>
> Author: James Henderson<br>
> Date: 2020-01-02T17:05:37Z<br>
> New Revision: 19a71e358ec89788b25f531c5e4f943c95f53bfc<br>
> <br>
> URL: <a href="https://github.com/llvm/llvm-" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-</a><br>
> project/commit/19a71e358ec89788b25f531c5e4f943c95f53bfc<br>
> DIFF: <a href="https://github.com/llvm/llvm-" rel="noreferrer" target="_blank">https://github.com/llvm/llvm-</a><br>
> project/commit/19a71e358ec89788b25f531c5e4f943c95f53bfc.diff<br>
> <br>
> LOG: [test][llvm-dwarfdump][NFC] Remove unused check<br>
> <br>
> Reviewed by: JDevlieghere<br>
> <br>
> Differential Revision: <a href="https://reviews.llvm.org/D71756" rel="noreferrer" target="_blank">https://reviews.llvm.org/D71756</a><br>
> <br>
> Added:<br>
> <br>
> <br>
> Modified:<br>
>     llvm/test/tools/llvm-dwarfdump/X86/debug_line_invalid.test<br>
> <br>
> Removed:<br>
> <br>
> <br>
> <br>
> ##########################################################################<br>
> ######<br>
> diff  --git a/llvm/test/tools/llvm-dwarfdump/X86/debug_line_invalid.test<br>
> b/llvm/test/tools/llvm-dwarfdump/X86/debug_line_invalid.test<br>
> index b28c7141918b..ebd9e9d8e8a4 100644<br>
> --- a/llvm/test/tools/llvm-dwarfdump/X86/debug_line_invalid.test<br>
> +++ b/llvm/test/tools/llvm-dwarfdump/X86/debug_line_invalid.test<br>
> @@ -1,136 +1,133 @@<br>
> -## Test the<br>
> diff erent error cases in the debug line parsing and how they prevent<br>
> -## or don't prevent further dumping of section contents.<br>
> -<br>
> -## Show that a bad length stops parsing of the section.<br>
> -# RUN: llvm-mc -triple x86_64-pc-linux<br>
> %S/Inputs/debug_line_reserved_length.s -filetype=obj -o %t-reserved.o<br>
> -# RUN: llvm-dwarfdump -debug-line %t-reserved.o 2> %t-reserved.err \<br>
> -# RUN:   | FileCheck %s --check-prefixes=FIRST,FATAL<br>
> -# RUN: FileCheck %s --input-file=%t-reserved.err --check-prefix=RESERVED<br>
> -# RUN: llvm-dwarfdump -debug-line %t-reserved.o -verbose 2> %t-reserved-<br>
> verbose.err \<br>
> -# RUN:   | FileCheck %s --check-prefixes=FIRST,FATAL<br>
> -# RUN: FileCheck %s --input-file=%t-reserved-verbose.err --check-<br>
> prefix=RESERVED<br>
> -<br>
> -## We only produce warnings for malformed tables after the specified unit<br>
> if<br>
> -## parsing can continue.<br>
> -# RUN: llvm-dwarfdump -debug-line=0 %t-reserved.o 2> %t-reserved-off-<br>
> first.err \<br>
> -# RUN:   | FileCheck %s --check-prefixes=FIRST,NOLATER<br>
> -# RUN: FileCheck %s --input-file=%t-reserved-off-first.err --check-<br>
> prefix=RESERVED<br>
> -<br>
> -## Stop looking for the specified unit, if a fatally-bad prologue is<br>
> detected.<br>
> -# RUN: llvm-dwarfdump -debug-line=0x4b %t-reserved.o 2> %t-reserved-off-<br>
> last.err \<br>
> -# RUN:   | FileCheck %s --check-prefixes=NOFIRST,NOLATER<br>
> -# RUN: FileCheck %s --input-file=%t-reserved-off-last.err --check-<br>
> prefix=RESERVED<br>
> -<br>
> -## Show that non-fatal errors do not prevent parsing the rest of the<br>
> section.<br>
> -# RUN: llvm-mc -triple x86_64-pc-linux %S/Inputs/debug_line_malformed.s -<br>
> filetype=obj -o %t-malformed.o<br>
> -# RUN: llvm-dwarfdump -debug-line %t-malformed.o 2> %t-malformed.err \<br>
> -# RUN:   | FileCheck %s --check-prefixes=FIRST,NONFATAL<br>
> -# RUN: FileCheck %s --input-file=%t-malformed.err --check-<br>
> prefixes=ALL,OTHER<br>
> -# RUN: llvm-dwarfdump -debug-line %t-malformed.o -verbose 2> %t-<br>
> malformed-verbose.err \<br>
> -# RUN:   | FileCheck %s --check-prefixes=FIRST,NONFATAL<br>
> -# RUN: FileCheck %s --input-file=%t-malformed-verbose.err --check-<br>
> prefixes=ALL,OTHER<br>
> -<br>
> -## We should still produce warnings for malformed tables after the<br>
> specified unit.<br>
> -# RUN: llvm-dwarfdump -debug-line=0 %t-malformed.o 2> %t-malformed-off-<br>
> first.err \<br>
> -# RUN:   | FileCheck %s --check-prefixes=FIRST,NOLATER<br>
> -# RUN: FileCheck %s --input-file=%t-malformed-off-first.err --check-<br>
> prefix=ALL<br>
> -<br>
> -## Don't stop looking for the later unit if non-fatal issues are found.<br>
> -# RUN: llvm-dwarfdump -debug-line=0x271 %t-malformed.o 2> %t-malformed-<br>
> off-last.err \<br>
> -# RUN:   | FileCheck %s --check-prefixes=LASTONLY<br>
> -# RUN: FileCheck %s --input-file=%t-malformed-off-last.err --check-<br>
> prefix=ALL<br>
> -<br>
> -# FIRST: debug_line[0x00000000]<br>
> -# FIRST: 0x000000000badbeef {{.*}} end_sequence<br>
> -# NOFIRST-NOT: debug_line[0x00000000]<br>
> -# NOFIRST-NOT: 0x000000000badbeef {{.*}} end_sequence<br>
> -# NOLATER-NOT: debug_line[{{.*}}]<br>
> -# NOLATER-NOT: end_sequence<br>
> -<br>
> -## For fatal issues, the following table(s) should not be dumped.<br>
> -# FATAL: debug_line[0x00000048]<br>
> -# FATAL-NEXT: Line table prologue<br>
> -# FATAL-NEXT: total_length: 0xfffffffe<br>
> -# FATAL-NOT: debug_line<br>
> -<br>
> -## For non-fatal prologue issues, the table prologue should be dumped,<br>
> and any<br>
> -## subsequent tables should also be.<br>
> -## Case 1: Version 0 table.<br>
> -# NONFATAL: debug_line[0x00000048]<br>
> -# NONFATAL-NEXT: Line table prologue<br>
> -# NONFATAL-NOT: Address<br>
> -<br>
> -## Case 2: Version 1 table.<br>
> -# NONFATAL: debug_line[0x0000004e]<br>
> -# NONFATAL-NEXT: Line table prologue<br>
> -# NONFATAL-NOT: Address<br>
> -<br>
> -## Case 3: Malformed directory format with no path component.<br>
> -# NONFATAL: debug_line[0x00000054]<br>
> -# NONFATAL-NEXT: Line table prologue<br>
> -# NONFATAL-NOT: Address<br>
> -<br>
> -## Case 4: Prologue with length shorter than parsed.<br>
> -# NONFATAL: debug_line[0x00000073]<br>
> -# NONFATAL-NEXT: Line table prologue<br>
> -# NONFATAL-NOT: Address<br>
> -<br>
> -## Case 5: Prologue with length longer than parsed.<br>
> -# NONFATAL: debug_line[0x000000ad]<br>
> -# NONFATAL-NEXT: Line table prologue<br>
> -# NONFATAL-NOT: Address<br>
> -<br>
> -## Case 6: Extended opcode with incorrect length versus expected.<br>
> -# NONFATAL: debug_line[0x000000e7]<br>
> -## Dumping prints the line table prologue and any valid operations up to<br>
> the<br>
> -## point causing the problem.<br>
> -# NONFATAL-NEXT: Line table prologue<br>
> -# NONFATAL: 0x00000000abbadaba {{.*}} end_sequence<br>
> -# NONFATAL-NOT: is_stmt<br>
> -<br>
> -## For minor issues, we can dump the whole table.<br>
> -## Case 7: No end of sequence.<br>
> -# NONFATAL: debug_line[0x0000013d]<br>
> -# NONFATAL-NEXT: Line table prologue<br>
> -# NONFATAL-NOT: debug_line[{{.*}}]<br>
> -# NONFATAL: 0x00000000deadfade {{.*}}<br>
> -<br>
> -## Case 8: Very short prologue length for V5 (ends during parameters).<br>
> -# NONFATAL: debug_line[0x00000183]<br>
> -# NONFATAL-NEXT: Line table prologue<br>
> -<br>
> -## TODO: Add checks here for remaining tables.<br>
> -<br>
> -# NONFATAL: debug_line[0x00000271]<br>
> -# NONFATAL-NOT: debug_line[{{.*}}]<br>
> -# NONFATAL: 0x00000000cafebabe {{.*}} end_sequence<br>
> -# NONFATAL-NOT: debug_line[{{.*}}]<br>
> -<br>
> -# LASTONLY-NOT: debug_line[{{.*}}]<br>
> -# LASTONLY: debug_line[0x00000271]<br>
> -# LASTONLY: 0x00000000cafebabe {{.*}} end_sequence<br>
> -<br>
> -# RESERVED: warning: parsing line table prologue at offset 0x00000048<br>
> unsupported reserved unit length found of value 0xfffffffe<br>
> -<br>
> -# MD5: warning: parsing line table prologue at 0x00000000 found an<br>
> invalid directory or file table description at 0x0000003b<br>
> -# MD5-NEXT: warning: failed to parse file entry because the MD5 hash is<br>
> invalid<br>
> -<br>
> -# ALL-NOT:  warning:<br>
> -# ALL:      warning: parsing line table prologue at offset 0x00000048<br>
> found unsupported version 0x00<br>
> -# ALL-NEXT: warning: parsing line table prologue at offset 0x0000004e<br>
> found unsupported version 0x01<br>
> -# ALL-NEXT: warning: parsing line table prologue at 0x00000054 found an<br>
> invalid directory or file table description at 0x00000073<br>
> -# ALL-NEXT: warning: failed to parse entry content descriptions because<br>
> no path was found<br>
> -# FIXME - The latter offset in the next line should be 0xad. The filename<br>
> parsing code does not notice a missing terminating byte.<br>
> -# ALL-NEXT: warning: parsing line table prologue at 0x00000073 should<br>
> have ended at 0x000000ab but it ended at 0x000000ac<br>
> -# ALL-NEXT: warning: parsing line table prologue at 0x000000ad should<br>
> have ended at 0x000000e8 but it ended at 0x000000e7<br>
> -# OTHER-NEXT: warning: unexpected line op length at offset 0x0000012e<br>
> expected 0x02 found 0x01<br>
> -# OTHER-NEXT: warning: last sequence in debug line table is not<br>
> terminated!<br>
> -# ALL-NEXT: warning: parsing line table prologue at 0x00000183 found an<br>
> invalid directory or file table description at 0x000001a2<br>
> -# ALL-NEXT: warning: failed to parse entry content descriptions at offset<br>
> 0x000001a2 because offset extends beyond the prologue end at offset<br>
> 0x0000019e<br>
> -# ALL-NEXT: warning: parsing line table prologue at 0x000001be found an<br>
> invalid directory or file table description at 0x000001eb<br>
> -# ALL-NEXT: warning: failed to parse file entry at offset 0x000001eb<br>
> because offset extends beyond the prologue end at offset 0x000001e9<br>
> -# ALL-NEXT: warning: parsing line table prologue at 0x000001f9 found an<br>
> invalid directory or file table description at 0x0000021b<br>
> -# ALL-NEXT: warning: failed to parse directory entry at offset 0x0000021b<br>
> because offset extends beyond the prologue end at offset 0x0000021b<br>
> -# ALL-NEXT: warning: parsing line table prologue at 0x00000234 found an<br>
> invalid directory or file table description at 0x00000269<br>
> -# ALL-NEXT: warning: failed to parse file entry because the MD5 hash is<br>
> invalid<br>
> -# ALL-NOT:  warning:<br>
> +## Test the<br>
> diff erent error cases in the debug line parsing and how they prevent<br>
> +## or don't prevent further dumping of section contents.<br>
> +<br>
> +## Show that a bad length stops parsing of the section.<br>
> +# RUN: llvm-mc -triple x86_64-pc-linux<br>
> %S/Inputs/debug_line_reserved_length.s -filetype=obj -o %t-reserved.o<br>
> +# RUN: llvm-dwarfdump -debug-line %t-reserved.o 2> %t-reserved.err \<br>
> +# RUN:   | FileCheck %s --check-prefixes=FIRST,FATAL<br>
> +# RUN: FileCheck %s --input-file=%t-reserved.err --check-prefix=RESERVED<br>
> +# RUN: llvm-dwarfdump -debug-line %t-reserved.o -verbose 2> %t-reserved-<br>
> verbose.err \<br>
> +# RUN:   | FileCheck %s --check-prefixes=FIRST,FATAL<br>
> +# RUN: FileCheck %s --input-file=%t-reserved-verbose.err --check-<br>
> prefix=RESERVED<br>
> +<br>
> +## We only produce warnings for malformed tables after the specified unit<br>
> if<br>
> +## parsing can continue.<br>
> +# RUN: llvm-dwarfdump -debug-line=0 %t-reserved.o 2> %t-reserved-off-<br>
> first.err \<br>
> +# RUN:   | FileCheck %s --check-prefixes=FIRST,NOLATER<br>
> +# RUN: FileCheck %s --input-file=%t-reserved-off-first.err --check-<br>
> prefix=RESERVED<br>
> +<br>
> +## Stop looking for the specified unit, if a fatally-bad prologue is<br>
> detected.<br>
> +# RUN: llvm-dwarfdump -debug-line=0x4b %t-reserved.o 2> %t-reserved-off-<br>
> last.err \<br>
> +# RUN:   | FileCheck %s --check-prefixes=NOFIRST,NOLATER<br>
> +# RUN: FileCheck %s --input-file=%t-reserved-off-last.err --check-<br>
> prefix=RESERVED<br>
> +<br>
> +## Show that non-fatal errors do not prevent parsing the rest of the<br>
> section.<br>
> +# RUN: llvm-mc -triple x86_64-pc-linux %S/Inputs/debug_line_malformed.s -<br>
> filetype=obj -o %t-malformed.o<br>
> +# RUN: llvm-dwarfdump -debug-line %t-malformed.o 2> %t-malformed.err \<br>
> +# RUN:   | FileCheck %s --check-prefixes=FIRST,NONFATAL<br>
> +# RUN: FileCheck %s --input-file=%t-malformed.err --check-<br>
> prefixes=ALL,OTHER<br>
> +# RUN: llvm-dwarfdump -debug-line %t-malformed.o -verbose 2> %t-<br>
> malformed-verbose.err \<br>
> +# RUN:   | FileCheck %s --check-prefixes=FIRST,NONFATAL<br>
> +# RUN: FileCheck %s --input-file=%t-malformed-verbose.err --check-<br>
> prefixes=ALL,OTHER<br>
> +<br>
> +## We should still produce warnings for malformed tables after the<br>
> specified unit.<br>
> +# RUN: llvm-dwarfdump -debug-line=0 %t-malformed.o 2> %t-malformed-off-<br>
> first.err \<br>
> +# RUN:   | FileCheck %s --check-prefixes=FIRST,NOLATER<br>
> +# RUN: FileCheck %s --input-file=%t-malformed-off-first.err --check-<br>
> prefix=ALL<br>
> +<br>
> +## Don't stop looking for the later unit if non-fatal issues are found.<br>
> +# RUN: llvm-dwarfdump -debug-line=0x271 %t-malformed.o 2> %t-malformed-<br>
> off-last.err \<br>
> +# RUN:   | FileCheck %s --check-prefixes=LASTONLY<br>
> +# RUN: FileCheck %s --input-file=%t-malformed-off-last.err --check-<br>
> prefix=ALL<br>
> +<br>
> +# FIRST: debug_line[0x00000000]<br>
> +# FIRST: 0x000000000badbeef {{.*}} end_sequence<br>
> +# NOFIRST-NOT: debug_line[0x00000000]<br>
> +# NOFIRST-NOT: 0x000000000badbeef {{.*}} end_sequence<br>
> +# NOLATER-NOT: debug_line[{{.*}}]<br>
> +# NOLATER-NOT: end_sequence<br>
> +<br>
> +## For fatal issues, the following table(s) should not be dumped.<br>
> +# FATAL: debug_line[0x00000048]<br>
> +# FATAL-NEXT: Line table prologue<br>
> +# FATAL-NEXT: total_length: 0xfffffffe<br>
> +# FATAL-NOT: debug_line<br>
> +<br>
> +## For non-fatal prologue issues, the table prologue should be dumped,<br>
> and any<br>
> +## subsequent tables should also be.<br>
> +## Case 1: Version 0 table.<br>
> +# NONFATAL: debug_line[0x00000048]<br>
> +# NONFATAL-NEXT: Line table prologue<br>
> +# NONFATAL-NOT: Address<br>
> +<br>
> +## Case 2: Version 1 table.<br>
> +# NONFATAL: debug_line[0x0000004e]<br>
> +# NONFATAL-NEXT: Line table prologue<br>
> +# NONFATAL-NOT: Address<br>
> +<br>
> +## Case 3: Malformed directory format with no path component.<br>
> +# NONFATAL: debug_line[0x00000054]<br>
> +# NONFATAL-NEXT: Line table prologue<br>
> +# NONFATAL-NOT: Address<br>
> +<br>
> +## Case 4: Prologue with length shorter than parsed.<br>
> +# NONFATAL: debug_line[0x00000073]<br>
> +# NONFATAL-NEXT: Line table prologue<br>
> +# NONFATAL-NOT: Address<br>
> +<br>
> +## Case 5: Prologue with length longer than parsed.<br>
> +# NONFATAL: debug_line[0x000000ad]<br>
> +# NONFATAL-NEXT: Line table prologue<br>
> +# NONFATAL-NOT: Address<br>
> +<br>
> +## Case 6: Extended opcode with incorrect length versus expected.<br>
> +# NONFATAL: debug_line[0x000000e7]<br>
> +## Dumping prints the line table prologue and any valid operations up to<br>
> the<br>
> +## point causing the problem.<br>
> +# NONFATAL-NEXT: Line table prologue<br>
> +# NONFATAL: 0x00000000abbadaba {{.*}} end_sequence<br>
> +# NONFATAL-NOT: is_stmt<br>
> +<br>
> +## For minor issues, we can dump the whole table.<br>
> +## Case 7: No end of sequence.<br>
> +# NONFATAL: debug_line[0x0000013d]<br>
> +# NONFATAL-NEXT: Line table prologue<br>
> +# NONFATAL-NOT: debug_line[{{.*}}]<br>
> +# NONFATAL: 0x00000000deadfade {{.*}}<br>
> +<br>
> +## Case 8: Very short prologue length for V5 (ends during parameters).<br>
> +# NONFATAL: debug_line[0x00000183]<br>
> +# NONFATAL-NEXT: Line table prologue<br>
> +<br>
> +## TODO: Add checks here for remaining tables.<br>
> +<br>
> +# NONFATAL: debug_line[0x00000271]<br>
> +# NONFATAL-NOT: debug_line[{{.*}}]<br>
> +# NONFATAL: 0x00000000cafebabe {{.*}} end_sequence<br>
> +# NONFATAL-NOT: debug_line[{{.*}}]<br>
> +<br>
> +# LASTONLY-NOT: debug_line[{{.*}}]<br>
> +# LASTONLY: debug_line[0x00000271]<br>
> +# LASTONLY: 0x00000000cafebabe {{.*}} end_sequence<br>
> +<br>
> +# RESERVED: warning: parsing line table prologue at offset 0x00000048<br>
> unsupported reserved unit length found of value 0xfffffffe<br>
> +<br>
> +# ALL-NOT:  warning:<br>
> +# ALL:      warning: parsing line table prologue at offset 0x00000048<br>
> found unsupported version 0x00<br>
> +# ALL-NEXT: warning: parsing line table prologue at offset 0x0000004e<br>
> found unsupported version 0x01<br>
> +# ALL-NEXT: warning: parsing line table prologue at 0x00000054 found an<br>
> invalid directory or file table description at 0x00000073<br>
> +# ALL-NEXT: warning: failed to parse entry content descriptions because<br>
> no path was found<br>
> +# FIXME - The latter offset in the next line should be 0xad. The filename<br>
> parsing code does not notice a missing terminating byte.<br>
> +# ALL-NEXT: warning: parsing line table prologue at 0x00000073 should<br>
> have ended at 0x000000ab but it ended at 0x000000ac<br>
> +# ALL-NEXT: warning: parsing line table prologue at 0x000000ad should<br>
> have ended at 0x000000e8 but it ended at 0x000000e7<br>
> +# OTHER-NEXT: warning: unexpected line op length at offset 0x0000012e<br>
> expected 0x02 found 0x01<br>
> +# OTHER-NEXT: warning: last sequence in debug line table is not<br>
> terminated!<br>
> +# ALL-NEXT: warning: parsing line table prologue at 0x00000183 found an<br>
> invalid directory or file table description at 0x000001a2<br>
> +# ALL-NEXT: warning: failed to parse entry content descriptions at offset<br>
> 0x000001a2 because offset extends beyond the prologue end at offset<br>
> 0x0000019e<br>
> +# ALL-NEXT: warning: parsing line table prologue at 0x000001be found an<br>
> invalid directory or file table description at 0x000001eb<br>
> +# ALL-NEXT: warning: failed to parse file entry at offset 0x000001eb<br>
> because offset extends beyond the prologue end at offset 0x000001e9<br>
> +# ALL-NEXT: warning: parsing line table prologue at 0x000001f9 found an<br>
> invalid directory or file table description at 0x0000021b<br>
> +# ALL-NEXT: warning: failed to parse directory entry at offset 0x0000021b<br>
> because offset extends beyond the prologue end at offset 0x0000021b<br>
> +# ALL-NEXT: warning: parsing line table prologue at 0x00000234 found an<br>
> invalid directory or file table description at 0x00000269<br>
> +# ALL-NEXT: warning: failed to parse file entry because the MD5 hash is<br>
> invalid<br>
> +# ALL-NOT:  warning:<br>
> <br>
> <br>
> <br>
> _______________________________________________<br>
> llvm-commits mailing list<br>
> <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
> <a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>