[PATCH] D57549: [llvm-objdump] - llvm-objdump can miss printing bytes at the end of a section.
Sid Manning via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 1 07:42:57 PST 2019
sidneym updated this revision to Diff 184752.
sidneym added a comment.
Updated the testcase.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57549/new/
https://reviews.llvm.org/D57549
Files:
test/tools/llvm-objdump/X86/bytes.test
tools/llvm-objdump/llvm-objdump.cpp
Index: tools/llvm-objdump/llvm-objdump.cpp
===================================================================
--- tools/llvm-objdump/llvm-objdump.cpp
+++ tools/llvm-objdump/llvm-objdump.cpp
@@ -1265,7 +1265,7 @@
// Indent the space for less than 8 bytes data.
// 2 spaces for byte and one for space between bytes
IndentOffset = 3 * (8 - NumBytes);
- for (int Excess = 8 - NumBytes; Excess < 8; Excess++)
+ for (int Excess = NumBytes; Excess < 8; Excess++)
AsciiData[Excess] = '\0';
NumBytes = 8;
}
Index: test/tools/llvm-objdump/X86/bytes.test
===================================================================
--- /dev/null
+++ test/tools/llvm-objdump/X86/bytes.test
@@ -0,0 +1,11 @@
+# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o -| \
+# RUN: llvm-objdump -d - | FileCheck %s
+
+.globl foo
+.type foo, @object
+foo:
+.ascii "this is a test"
+
+# CHECK: foo:
+# CHECK: 0:{{.*}}this is
+# CHECK: 8:{{.*}}a test
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57549.184752.patch
Type: text/x-patch
Size: 1047 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190201/fda56aa0/attachment.bin>
More information about the llvm-commits
mailing list