kernel/x86: Don't skip the first address when fetching user stack traces.

Let the loop handle the iframe instead of processing it up front,
so that it doesn't call get_next_frame_no_debugger the first time around.

Fixes the profiler skipping the first function when profiling user
space only.
This commit is contained in:
Augustin Cavalier 2024-07-23 13:23:13 -04:00
parent bda66ab7c7
commit 80d5c28e2a

View File

@ -1147,8 +1147,7 @@ arch_debug_get_stack_trace(addr_t* returnAddresses, int32 maxCount,
if (frame == NULL)
return 0;
bp = frame->bp;
onKernelStack = false;
bp = (addr_t)frame;
}
while (bp != 0 && count < maxCount) {