The whitespace in output lines containing disassembled instructions
was extremely mismatched against that in .word lines produced from
dumping literal pools and other data in Arm ELF files. This patch
adjusts dumpARMELFData so that it uses the same alignment system as
in the instruction pretty-printers. Now the two classes of line are
aligned sensibly alongside each other.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
LGTM
Makes me wonder if .word should also print the bytes together like you're changing instructions to do but that's a separate thing.
$ objdump -d /tmp/test.o <...> 0: cafef00d .word 0xcafef00d $ ./bin/llvm-objdump -d /tmp/test.o <...> 0000000000000000 <fn>: 0: 0d f0 fe ca .word 0xcafef00d
llvm/tools/llvm-objdump/llvm-objdump.cpp | ||
---|---|---|
1019 | This becomes Bytes[Index] when you rebase to include https://reviews.llvm.org/D130360 I assume. |
I agree that it's separate. In particular, that's data rather than code, so you do have to pay attention to endianness, and I wasn't sure if it would get confusing in a big-endian disassembly to have code and data lines right next to each other both showing 32-bit hex numbers which are implicitly representing the contents of memory in conflicting endiannesses!
llvm/tools/llvm-objdump/llvm-objdump.cpp | ||
---|---|---|
1019 | Yes, I reordered the patches because D130360 got review attention first, and haven't rebased this one yet. |
This becomes Bytes[Index] when you rebase to include https://reviews.llvm.org/D130360 I assume.