summaryrefslogtreecommitdiff
path: root/Userland/disasm.cpp
diff options
context:
space:
mode:
authorasynts <asynts@gmail.com>2020-10-23 18:37:35 +0200
committerAndreas Kling <kling@serenityos.org>2020-10-24 12:56:25 +0200
commit88bca152c9416dc9da49a6e86a456e5b195cc328 (patch)
treebc2a4386e5b6e7a5576eccb52b5a80f3550ade34 /Userland/disasm.cpp
parent61e73b1a7b538d7e70ec8e0a32c30883da15026a (diff)
downloadserenity-88bca152c9416dc9da49a6e86a456e5b195cc328.zip
AK: Eradicate the uses of out().
Diffstat (limited to 'Userland/disasm.cpp')
-rw-r--r--Userland/disasm.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/Userland/disasm.cpp b/Userland/disasm.cpp
index 7f2e811058..401086e12a 100644
--- a/Userland/disasm.cpp
+++ b/Userland/disasm.cpp
@@ -126,7 +126,7 @@ int main(int argc, char** argv)
if (current_symbol < symbols.end() && !current_symbol->contains(virtual_offset)) {
if (!is_first_symbol && current_instruction_is_in_symbol) {
// The previous instruction was part of a symbol that doesn't cover the current instruction, so separate it from the current instruction with a newline.
- out();
+ outln();
current_instruction_is_in_symbol = (current_symbol + 1 < symbols.end() && (current_symbol + 1)->contains(virtual_offset));
}
@@ -134,21 +134,19 @@ int main(int argc, char** argv)
while (current_symbol + 1 < symbols.end() && !(current_symbol + 1)->contains(virtual_offset) && (current_symbol + 1)->address() <= virtual_offset) {
++current_symbol;
if (!is_first_symbol)
- out() << "\n(" << current_symbol->name << " (" << String::format("%08x-%08x", current_symbol->address(), current_symbol->address_end()) << "))\n";
+ outln("\n({} ({:p}-{:p}))\n", current_symbol->name, current_symbol->address(), current_symbol->address_end());
}
while (current_symbol + 1 < symbols.end() && (current_symbol + 1)->contains(virtual_offset)) {
if (!is_first_symbol && !current_instruction_is_in_symbol)
- out();
+ outln();
++current_symbol;
current_instruction_is_in_symbol = true;
- out() << current_symbol->name << " (" << String::format("%08x-%08x", current_symbol->address(), current_symbol->address_end()) << "):";
+ outln("{} ({:p}-{:p}):", current_symbol->name, current_symbol->address(), current_symbol->address_end());
}
is_first_symbol = false;
}
- out() << String::format("%08x", virtual_offset) << " " << insn.value().to_string(virtual_offset, symbol_provider);
+ outln("{:p} {}", virtual_offset, insn.value().to_string(virtual_offset, symbol_provider));
}
-
- return 0;
}