mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
fiq_debugger: arm64: fix command bt, show correct call stack
Change-Id: I718bdfb4247e67542ae665572b0438066fd9daab Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
This commit is contained in:
@@ -159,7 +159,6 @@ struct stacktrace_state {
|
||||
unsigned int depth;
|
||||
};
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 16, 0)
|
||||
static bool report_trace(void *data, unsigned long pc)
|
||||
{
|
||||
struct stacktrace_state *sts = data;
|
||||
@@ -173,7 +172,6 @@ static bool report_trace(void *data, unsigned long pc)
|
||||
|
||||
return sts->depth != 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
void fiq_debugger_dump_stacktrace(struct fiq_debugger_output *output,
|
||||
const struct pt_regs *regs, unsigned int depth, void *ssp)
|
||||
@@ -199,6 +197,11 @@ void fiq_debugger_dump_stacktrace(struct fiq_debugger_output *output,
|
||||
output->printf(output, "\n");
|
||||
walk_stackframe(current, &frame, report_trace, &sts);
|
||||
}
|
||||
#else
|
||||
if (!user_mode(regs)) {
|
||||
output->printf(output, "\n");
|
||||
arch_stack_walk(report_trace, (void *)&sts, current, (struct pt_regs *)regs);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user