mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-10 13:48:44 +00:00
Fixed llvm-objdump uint64_t formatted output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143120 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -289,7 +289,7 @@ static void DisassembleObject(const ObjectFile *Obj, bool InlineRelocs) {
|
|||||||
|
|
||||||
if (DisAsm->getInstruction(Inst, Size, memoryObject, Index,
|
if (DisAsm->getInstruction(Inst, Size, memoryObject, Index,
|
||||||
DebugOut, nulls())) {
|
DebugOut, nulls())) {
|
||||||
outs() << format("%8x:\t", SectionAddr + Index);
|
outs() << format("%8llx:\t", SectionAddr + Index);
|
||||||
DumpBytes(StringRef(Bytes.data() + Index, Size));
|
DumpBytes(StringRef(Bytes.data() + Index, Size));
|
||||||
IP->printInst(&Inst, outs(), "");
|
IP->printInst(&Inst, outs(), "");
|
||||||
outs() << "\n";
|
outs() << "\n";
|
||||||
@ -316,7 +316,7 @@ static void DisassembleObject(const ObjectFile *Obj, bool InlineRelocs) {
|
|||||||
if (error(rel_cur->getTypeName(name))) goto skip_print_rel;
|
if (error(rel_cur->getTypeName(name))) goto skip_print_rel;
|
||||||
if (error(rel_cur->getValueString(val))) goto skip_print_rel;
|
if (error(rel_cur->getValueString(val))) goto skip_print_rel;
|
||||||
|
|
||||||
outs() << format("\t\t\t%8x: ", SectionAddr + addr) << name << "\t"
|
outs() << format("\t\t\t%8llx: ", SectionAddr + addr) << name << "\t"
|
||||||
<< val << "\n";
|
<< val << "\n";
|
||||||
|
|
||||||
skip_print_rel:
|
skip_print_rel:
|
||||||
@ -400,7 +400,7 @@ static void PrintSectionContents(const ObjectFile *o) {
|
|||||||
|
|
||||||
// Dump out the content as hex and printable ascii characters.
|
// Dump out the content as hex and printable ascii characters.
|
||||||
for (std::size_t addr = 0, end = Contents.size(); addr < end; addr += 16) {
|
for (std::size_t addr = 0, end = Contents.size(); addr < end; addr += 16) {
|
||||||
outs() << format(" %04x ", BaseAddr + addr);
|
outs() << format(" %04llx ", BaseAddr + addr);
|
||||||
// Dump line of hex.
|
// Dump line of hex.
|
||||||
for (std::size_t i = 0; i < 16; ++i) {
|
for (std::size_t i = 0; i < 16; ++i) {
|
||||||
if (i != 0 && i % 4 == 0)
|
if (i != 0 && i % 4 == 0)
|
||||||
@ -506,7 +506,7 @@ static void PrintSymbolTable(const ObjectFile *o) {
|
|||||||
else if (Type == SymbolRef::ST_Function)
|
else if (Type == SymbolRef::ST_Function)
|
||||||
FileFunc = 'F';
|
FileFunc = 'F';
|
||||||
|
|
||||||
outs() << format("%08x", Offset) << " "
|
outs() << format("%08llx", Offset) << " "
|
||||||
<< GlobLoc // Local -> 'l', Global -> 'g', Neither -> ' '
|
<< GlobLoc // Local -> 'l', Global -> 'g', Neither -> ' '
|
||||||
<< (Weak ? 'w' : ' ') // Weak?
|
<< (Weak ? 'w' : ' ') // Weak?
|
||||||
<< ' ' // Constructor. Not supported yet.
|
<< ' ' // Constructor. Not supported yet.
|
||||||
@ -526,7 +526,7 @@ static void PrintSymbolTable(const ObjectFile *o) {
|
|||||||
outs() << SectionName;
|
outs() << SectionName;
|
||||||
}
|
}
|
||||||
outs() << '\t'
|
outs() << '\t'
|
||||||
<< format("%08x ", Size)
|
<< format("%08llx ", Size)
|
||||||
<< Name
|
<< Name
|
||||||
<< '\n';
|
<< '\n';
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user