Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 233
b: refs/heads/master
c: 652a12e
h: refs/heads/master
i:
  231: fe6c946
v: v3
  • Loading branch information
Russell King committed Apr 17, 2005
1 parent 849f944 commit 6762fc8
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 58c02ec4701c94c671a41e1e5d50c582e859851f
refs/heads/master: 652a12ef98d16ccd1ee5cdf2c832ce5411ed3262
15 changes: 11 additions & 4 deletions trunk/arch/arm/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,11 @@ void machine_restart(char * __unused)

EXPORT_SYMBOL(machine_restart);

void show_regs(struct pt_regs * regs)
void __show_regs(struct pt_regs *regs)
{
unsigned long flags;

flags = condition_codes(regs);
unsigned long flags = condition_codes(regs);

printk("CPU: %d\n", smp_processor_id());
print_symbol("PC is at %s\n", instruction_pointer(regs));
print_symbol("LR is at %s\n", regs->ARM_lr);
printk("pc : [<%08lx>] lr : [<%08lx>] %s\n"
Expand Down Expand Up @@ -213,6 +212,14 @@ void show_regs(struct pt_regs * regs)
}
}

void show_regs(struct pt_regs * regs)
{
printk("\n");
printk("Pid: %d, comm: %20s\n", current->pid, current->comm);
__show_regs(regs);
__backtrace();
}

void show_fpregs(struct user_fp *regs)
{
int i;
Expand Down
8 changes: 2 additions & 6 deletions trunk/arch/arm/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@

#include "ptrace.h"

extern void c_backtrace (unsigned long fp, int pmode);
extern void show_pte(struct mm_struct *mm, unsigned long addr);

const char *processor_modes[]=
{ "USER_26", "FIQ_26" , "IRQ_26" , "SVC_26" , "UK4_26" , "UK5_26" , "UK6_26" , "UK7_26" ,
"UK8_26" , "UK9_26" , "UK10_26", "UK11_26", "UK12_26", "UK13_26", "UK14_26", "UK15_26",
Expand Down Expand Up @@ -216,8 +213,7 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err)

printk("Internal error: %s: %x [#%d]\n", str, err, ++die_counter);
print_modules();
printk("CPU: %d\n", smp_processor_id());
show_regs(regs);
__show_regs(regs);
printk("Process %s (pid: %d, stack limit = 0x%p)\n",
tsk->comm, tsk->pid, tsk->thread_info + 1);

Expand Down Expand Up @@ -482,7 +478,7 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs)
current->pid, current->comm, no);
dump_instr(regs);
if (user_mode(regs)) {
show_regs(regs);
__show_regs(regs);
c_backtrace(regs->ARM_fp, processor_mode(regs));
}
}
Expand Down
5 changes: 1 addition & 4 deletions trunk/include/asm-arm/ptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,8 @@ extern unsigned long profile_pc(struct pt_regs *regs);
#endif

#ifdef __KERNEL__
extern void show_regs(struct pt_regs *);

#define predicate(x) (x & 0xf0000000)
#define predicate(x) ((x) & 0xf0000000)
#define PREDICATE_ALWAYS 0xe0000000

#endif

#endif /* __ASSEMBLY__ */
Expand Down
3 changes: 3 additions & 0 deletions trunk/include/asm-arm/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ void hook_fault_code(int nr, int (*fn)(unsigned long, unsigned int,
#define tas(ptr) (xchg((ptr),1))

extern asmlinkage void __backtrace(void);
extern asmlinkage void c_backtrace(unsigned long fp, int pmode);
extern void show_pte(struct mm_struct *mm, unsigned long addr);
extern void __show_regs(struct pt_regs *);

extern int cpu_architecture(void);

Expand Down

0 comments on commit 6762fc8

Please sign in to comment.