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
174174 printk("Stack :");
175175 i = 0;
176176 while ((unsigned long) sp & (PAGE_SIZE - 1)) {
177− if (i && ((i % (64 / field)) == 0))
178− printk("\n ");
177+ if (i && ((i % (64 / field)) == 0)) {
178+ pr_cont("\n");
179+ printk(" ");
180+ }
179181 if (i > 39) {
180− printk(" ...");
182+ pr_cont(" ...");
181183 break;
182184 }
183185
184186 if (__get_user(stackdata, sp++)) {
185− printk(" (Bad stack address)");
187+ pr_cont(" (Bad stack address)");
186188 break;
187189 }
188190
189− printk(" %0*lx", field, stackdata);
191+ pr_cont(" %0*lx", field, stackdata);
190192 i++;
191193 }
192− printk("\n");
194+ pr_cont("\n");
193195 show_backtrace(task, regs);
194196 }
195197

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