mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 11:35:10 +00:00
UserspaceEmulator: Fix busted backtraces with --report-to-debug
Some of the output was still going to stderr in this mode, we need to use reportln() to make sure it goes to the right place.
This commit is contained in:
parent
957e7d10d4
commit
ae10c9d8ec
1 changed files with 2 additions and 3 deletions
|
@ -230,11 +230,10 @@ void Emulator::dump_backtrace(const Vector<FlatPtr>& backtrace)
|
|||
u32 offset = 0;
|
||||
String symbol = m_elf->symbolicate(address, &offset);
|
||||
auto source_position = m_debug_info->get_source_position(address);
|
||||
new_warn("=={}== {:p} {}", getpid(), address, symbol);
|
||||
if (source_position.has_value())
|
||||
reportln(" (\033[34;1m{}\033[0m:{})", LexicalPath(source_position.value().file_path).basename(), source_position.value().line_number);
|
||||
reportln("=={}== {:p} {} (\033[34;1m{}\033[0m:{})", getpid(), address, symbol, LexicalPath(source_position.value().file_path).basename(), source_position.value().line_number);
|
||||
else
|
||||
reportln(" +{:x}", offset);
|
||||
reportln("=={}== {:p} {} +{:x}", getpid(), address, symbol, offset);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue