mirror of
https://github.com/RGBCube/serenity
synced 2025-07-10 11:57:35 +00:00
Kernel: Make Processor::capture_stack_trace fallible using ErrorOr
This commit is contained in:
parent
03b7352286
commit
0142f33ddc
4 changed files with 15 additions and 12 deletions
|
@ -27,7 +27,7 @@ ErrorOr<void> Process::procfs_get_thread_stack(ThreadID thread_id, KBufferBuilde
|
|||
return ESRCH;
|
||||
bool show_kernel_addresses = Process::current().is_superuser();
|
||||
bool kernel_address_added = false;
|
||||
for (auto address : Processor::capture_stack_trace(*thread, 1024)) {
|
||||
for (auto address : TRY(Processor::capture_stack_trace(*thread, 1024))) {
|
||||
if (!show_kernel_addresses && !Memory::is_user_address(VirtualAddress { address })) {
|
||||
if (kernel_address_added)
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue