[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 11:11:43 PST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL352900: [llvm-objdump] - llvm-objdump can skip bytes at the end of a section. (authored by sidneym, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D57549?vs=184752&id=184799#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57549/new/
https://reviews.llvm.org/D57549
Files:
llvm/trunk/test/tools/llvm-objdump/X86/disasm-text.test
llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
Index: llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
===================================================================
--- llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
+++ llvm/trunk/tools/llvm-objdump/llvm-objdump.cpp
@@ -1268,7 +1268,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: llvm/trunk/test/tools/llvm-objdump/X86/disasm-text.test
===================================================================
--- llvm/trunk/test/tools/llvm-objdump/X86/disasm-text.test
+++ llvm/trunk/test/tools/llvm-objdump/X86/disasm-text.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.184799.patch
Type: text/x-patch
Size: 1160 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190201/c09b4c02/attachment.bin>
More information about the llvm-commits
mailing list