Page MenuHomePhabricator

[llvm-objdump] Fix --file-headers (-f) option
ClosedPublic

Authored by mstojanovic on Oct 18 2018, 8:25 AM.

Details

Summary

Changed the format call to match the surrounding code. Previously it was printing an unsigned int while the return type being printed was long unsigned int or wider. This caused problems for big-endian systems which were discovered on mips64.
Also, the printed address had less characters than it should because the character count was directly obtained from the number of bytes in the address. The tests were adapted to fit this fix and now use longer addresses.

Diff Detail

Repository
rL LLVM

Event Timeline

mstojanovic created this revision.Oct 18 2018, 8:25 AM

LGTM, with one nit.

tools/llvm-objdump/llvm-objdump.cpp
2225 ↗(On Diff #170089)

Nit: address -> Address, or just do this inline, I don't mind which.

Renamed address -> Address.

jhenderson accepted this revision.Oct 19 2018, 10:09 AM

LGTM. Sorry, forgot to do this last time!

This revision is now accepted and ready to land.Oct 19 2018, 10:09 AM
This revision was automatically updated to reflect the committed changes.