1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 07:57:49 +00:00

UserspaceEmulator: Fix inconsistent log formatting

Remove some extra { and } around the PID in log output that weren't used
consistently in all logging.
This commit is contained in:
Andreas Kling 2021-10-31 15:55:58 +01:00
parent d3eb513152
commit aff2b42f82

View file

@ -446,12 +446,12 @@ String Emulator::create_backtrace_line(FlatPtr address)
{ {
auto maybe_symbol = symbol_at(address); auto maybe_symbol = symbol_at(address);
if (!maybe_symbol.has_value()) { if (!maybe_symbol.has_value()) {
return String::formatted("=={{{}}}== {:p}", getpid(), address); return String::formatted("=={}== {:p}", getpid(), address);
} else if (!maybe_symbol->source_position.has_value()) { } else if (!maybe_symbol->source_position.has_value()) {
return String::formatted("=={{{}}}== {:p} [{}]: {}", getpid(), address, maybe_symbol->lib_name, maybe_symbol->symbol); return String::formatted("=={}== {:p} [{}]: {}", getpid(), address, maybe_symbol->lib_name, maybe_symbol->symbol);
} else { } else {
auto const& source_position = maybe_symbol->source_position.value(); auto const& source_position = maybe_symbol->source_position.value();
return String::formatted("=={{{}}}== {:p} [{}]: {} (\e[34;1m{}\e[0m:{})", getpid(), address, maybe_symbol->lib_name, maybe_symbol->symbol, LexicalPath::basename(source_position.file_path), source_position.line_number); return String::formatted("=={}== {:p} [{}]: {} (\e[34;1m{}\e[0m:{})", getpid(), address, maybe_symbol->lib_name, maybe_symbol->symbol, LexicalPath::basename(source_position.file_path), source_position.line_number);
} }
} }