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:
@@ -1147,8 +1147,7 @@ arch_debug_get_stack_trace(addr_t* returnAddresses, int32 maxCount,
|
|||||||
if (frame == NULL)
|
if (frame == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
bp = frame->bp;
|
bp = (addr_t)frame;
|
||||||
onKernelStack = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
while (bp != 0 && count < maxCount) {
|
while (bp != 0 && count < maxCount) {
|
||||||
|
|||||||
Reference in New Issue
Block a user