History

MIPS: traps: Fix output of show_stacktrace

Since commit 4bcc595ccd80 ("printk: reinstate KERN_CONT for printing continuation lines") the output from show_stacktrace on MIPS has been pretty unreadable due to the lack of KERN_CONT markers. Use pr_cont to provide the appropriate markers & restore the expected output. Also start a new line with printk such that the presence of timing information does not interfere with output.

Matt Redfearn committed 10 years ago

Commit fe4e09e1 parent bcf084d1 file · +8 −6Browse files

Unified · Split

arch/mips/kernel/traps.c+8−6
@@ -174,22 +174,24 @@ static void show_stacktrace(struct task_struct *task, · 173 unmodified lines
174 printk("Stack :");174 printk("Stack :");
175 i = 0;175 i = 0;
176 while ((unsigned long) sp & (PAGE_SIZE - 1)) {176 while ((unsigned long) sp & (PAGE_SIZE - 1)) {
177 if (i && ((i % (64 / field)) == 0))177 if (i && ((i % (64 / field)) == 0)) {
178 printk("\n ");178 pr_cont("\n");
179 printk(" ");
180 }
179 if (i > 39) {181 if (i > 39) {
180 printk(" ...");182 pr_cont(" ...");
181 break;183 break;
182 }184 }
183 185
184 if (__get_user(stackdata, sp++)) {186 if (__get_user(stackdata, sp++)) {
185 printk(" (Bad stack address)");187 pr_cont(" (Bad stack address)");
186 break;188 break;
187 }189 }
188 190
189 printk(" %0*lx", field, stackdata);191 pr_cont(" %0*lx", field, stackdata);
190 i++;192 i++;
191 }193 }
192 printk("\n");194 pr_cont("\n");
193 show_backtrace(task, regs);195 show_backtrace(task, regs);
194}196}
195 197

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t