diff options
author | Andreas Kling <kling@serenityos.org> | 2021-04-21 23:05:02 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-21 23:49:02 +0200 |
commit | 0058a1173e25b57343bb9819148be16106eea68c (patch) | |
tree | 43d297dacd2d8e3cd90462ae45ff2f434a2bffaa /Userland/DevTools/UserspaceEmulator/Emulator.cpp | |
parent | c68dcf45b661b4bc4a62fd9fa1f4945ba4760801 (diff) | |
download | serenity-0058a1173e25b57343bb9819148be16106eea68c.zip |
UserspaceEmulator: Convert String::format() => String::formatted()
Diffstat (limited to 'Userland/DevTools/UserspaceEmulator/Emulator.cpp')
-rw-r--r-- | Userland/DevTools/UserspaceEmulator/Emulator.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/DevTools/UserspaceEmulator/Emulator.cpp b/Userland/DevTools/UserspaceEmulator/Emulator.cpp index 83d228abd4..0cc8bfc9d2 100644 --- a/Userland/DevTools/UserspaceEmulator/Emulator.cpp +++ b/Userland/DevTools/UserspaceEmulator/Emulator.cpp @@ -294,7 +294,7 @@ const MmapRegion* Emulator::find_text_region(FlatPtr address) String Emulator::create_backtrace_line(FlatPtr address) { - String minimal = String::format("=={%d}== %p", getpid(), (void*)address); + auto minimal = String::formatted("=={{{}}}== {:p}", getpid(), (void*)address); const auto* region = find_text_region(address); if (!region) return minimal; @@ -320,11 +320,11 @@ String Emulator::create_backtrace_line(FlatPtr address) auto& elf = it->value.debug_info->elf(); String symbol = elf.symbolicate(address - region->base()); - auto line_without_source_info = String::format("=={%d}== %p [%s]: %s", getpid(), (void*)address, lib_name.characters(), symbol.characters()); + auto line_without_source_info = String::formatted("=={{{}}}== {:p} [{}]: {}", getpid(), (void*)address, lib_name, symbol); auto source_position = it->value.debug_info->get_source_position(address - region->base()); if (source_position.has_value()) - return String::format("=={%d}== %p [%s]: %s (\033[34;1m%s\033[0m:%zu)", getpid(), (void*)address, lib_name.characters(), symbol.characters(), LexicalPath(source_position.value().file_path).basename().characters(), source_position.value().line_number); + return String::formatted("=={{{}}}== {:p} [{}]: {} (\e[34;1m{}\e[0m:{})", getpid(), (void*)address, lib_name, symbol, LexicalPath(source_position.value().file_path).basename(), source_position.value().line_number); return line_without_source_info; } |