Kernel: Make Processor::capture_stack_trace fallible using ErrorOr

This commit is contained in:
Idan Horowitz 2022-01-15 21:19:16 +02:00
commit 0142f33ddc
Notes: sideshowbarker 2024-07-17 20:49:09 +09:00
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) {