1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-03 05:22:08 +00:00

Kernel: Make Processor::capture_stack_trace fallible using ErrorOr

This commit is contained in:
Idan Horowitz 2022-01-15 21:19:16 +02:00
parent 03b7352286
commit 0142f33ddc
4 changed files with 15 additions and 12 deletions

View file

@ -1192,7 +1192,7 @@ ErrorOr<NonnullOwnPtr<KString>> Thread::backtrace()
Vector<RecognizedSymbol, 128> recognized_symbols;
auto& process = const_cast<Process&>(this->process());
auto stack_trace = Processor::capture_stack_trace(*this);
auto stack_trace = TRY(Processor::capture_stack_trace(*this));
VERIFY(!g_scheduler_lock.is_locked_by_current_processor());
ScopedAddressSpaceSwitcher switcher(process);
for (auto& frame : stack_trace) {