Commit 487c4b23 authored by Greentime Hu's avatar Greentime Hu

nds32: Only print one page of stack when die to prevent printing too much information.

It may print too much information sometimes if the stack is wrong or
too big. This patch can limit the debug information in a page of stack.
Signed-off-by: default avatarGreentime Hu <greentime@andestech.com>
parent 95f93ed7
...@@ -173,11 +173,10 @@ void die(const char *str, struct pt_regs *regs, int err) ...@@ -173,11 +173,10 @@ void die(const char *str, struct pt_regs *regs, int err)
pr_emerg("CPU: %i\n", smp_processor_id()); pr_emerg("CPU: %i\n", smp_processor_id());
show_regs(regs); show_regs(regs);
pr_emerg("Process %s (pid: %d, stack limit = 0x%p)\n", pr_emerg("Process %s (pid: %d, stack limit = 0x%p)\n",
tsk->comm, tsk->pid, task_thread_info(tsk) + 1); tsk->comm, tsk->pid, end_of_stack(tsk));
if (!user_mode(regs) || in_interrupt()) { if (!user_mode(regs) || in_interrupt()) {
dump_mem("Stack: ", regs->sp, dump_mem("Stack: ", regs->sp, (regs->sp + PAGE_SIZE) & PAGE_MASK);
THREAD_SIZE + (unsigned long)task_thread_info(tsk));
dump_instr(regs); dump_instr(regs);
dump_stack(); dump_stack();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment