1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 08:44:58 +00:00

LibX86+disasm: Use an output format closer to objdump

This mainly does two things,
1. Removes spaces after commas
2. Elides "0x" and leading zeros in most contexts

Remaining differences are:
1. objdump always has memory size annotations
   We lack these and probably have some annotations wrong
2. Boolean check names
   We use jump-zero, while objdump uses jump-equal for example
3. We sometimes add "00 00" symbols, which objdump elides
4. We always demangle (This is a good thing)
5. We always resolve relocations (This is a good thing)
6. We seem to detect some symbols differently/incorrectly
This commit is contained in:
Hendiadyoin1 2022-04-07 14:53:19 +02:00 committed by Andreas Kling
parent 5ee85aaa5d
commit f602bbf135
2 changed files with 128 additions and 130 deletions

View file

@ -124,7 +124,7 @@ ErrorOr<int> serenity_main(Main::Arguments args)
outln();
++current_symbol;
current_instruction_is_in_symbol = true;
outln("{} ({:p}-{:p}):", current_symbol->name, current_symbol->address(), current_symbol->address_end());
outln("{:08x} <{}>:", current_symbol->address(), current_symbol->name);
}
is_first_symbol = false;