diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2005-04-17 10:50:36 -0400 |
---|---|---|
committer | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2005-04-17 10:50:36 -0400 |
commit | 652a12ef98d16ccd1ee5cdf2c832ce5411ed3262 (patch) | |
tree | fb4202396bed56574c68f5b516eeb85846e88c6a /arch/arm/kernel/process.c | |
parent | 58c02ec4701c94c671a41e1e5d50c582e859851f (diff) |
[PATCH] ARM: showregs
Fix show_regs() to provide a backtrace. Provide a new __show_regs()
function which implements the common subset of show_regs() and die().
Add prototypes to asm-arm/system.h
Signed-off-by: Russell King <rmk@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/process.c')
-rw-r--r-- | arch/arm/kernel/process.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index dbd8ca89b385..26eacd3e5def 100644 --- a/arch/arm/kernel/process.c +++ b/arch/arm/kernel/process.c | |||
@@ -168,12 +168,11 @@ void machine_restart(char * __unused) | |||
168 | 168 | ||
169 | EXPORT_SYMBOL(machine_restart); | 169 | EXPORT_SYMBOL(machine_restart); |
170 | 170 | ||
171 | void show_regs(struct pt_regs * regs) | 171 | void __show_regs(struct pt_regs *regs) |
172 | { | 172 | { |
173 | unsigned long flags; | 173 | unsigned long flags = condition_codes(regs); |
174 | |||
175 | flags = condition_codes(regs); | ||
176 | 174 | ||
175 | printk("CPU: %d\n", smp_processor_id()); | ||
177 | print_symbol("PC is at %s\n", instruction_pointer(regs)); | 176 | print_symbol("PC is at %s\n", instruction_pointer(regs)); |
178 | print_symbol("LR is at %s\n", regs->ARM_lr); | 177 | print_symbol("LR is at %s\n", regs->ARM_lr); |
179 | printk("pc : [<%08lx>] lr : [<%08lx>] %s\n" | 178 | printk("pc : [<%08lx>] lr : [<%08lx>] %s\n" |
@@ -213,6 +212,14 @@ void show_regs(struct pt_regs * regs) | |||
213 | } | 212 | } |
214 | } | 213 | } |
215 | 214 | ||
215 | void show_regs(struct pt_regs * regs) | ||
216 | { | ||
217 | printk("\n"); | ||
218 | printk("Pid: %d, comm: %20s\n", current->pid, current->comm); | ||
219 | __show_regs(regs); | ||
220 | __backtrace(); | ||
221 | } | ||
222 | |||
216 | void show_fpregs(struct user_fp *regs) | 223 | void show_fpregs(struct user_fp *regs) |
217 | { | 224 | { |
218 | int i; | 225 | int i; |