diff options
-rw-r--r-- | arch/arm/kernel/kgdb.c | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/arch/arm/kernel/kgdb.c b/arch/arm/kernel/kgdb.c index fd9eefce0a7b..9232caee7060 100644 --- a/arch/arm/kernel/kgdb.c +++ b/arch/arm/kernel/kgdb.c | |||
@@ -74,7 +74,7 @@ int dbg_set_reg(int regno, void *mem, struct pt_regs *regs) | |||
74 | void | 74 | void |
75 | sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *task) | 75 | sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *task) |
76 | { | 76 | { |
77 | struct pt_regs *thread_regs; | 77 | struct thread_info *ti; |
78 | int regno; | 78 | int regno; |
79 | 79 | ||
80 | /* Just making sure... */ | 80 | /* Just making sure... */ |
@@ -86,24 +86,17 @@ sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *task) | |||
86 | gdb_regs[regno] = 0; | 86 | gdb_regs[regno] = 0; |
87 | 87 | ||
88 | /* Otherwise, we have only some registers from switch_to() */ | 88 | /* Otherwise, we have only some registers from switch_to() */ |
89 | thread_regs = task_pt_regs(task); | 89 | ti = task_thread_info(task); |
90 | gdb_regs[_R0] = thread_regs->ARM_r0; | 90 | gdb_regs[_R4] = ti->cpu_context.r4; |
91 | gdb_regs[_R1] = thread_regs->ARM_r1; | 91 | gdb_regs[_R5] = ti->cpu_context.r5; |
92 | gdb_regs[_R2] = thread_regs->ARM_r2; | 92 | gdb_regs[_R6] = ti->cpu_context.r6; |
93 | gdb_regs[_R3] = thread_regs->ARM_r3; | 93 | gdb_regs[_R7] = ti->cpu_context.r7; |
94 | gdb_regs[_R4] = thread_regs->ARM_r4; | 94 | gdb_regs[_R8] = ti->cpu_context.r8; |
95 | gdb_regs[_R5] = thread_regs->ARM_r5; | 95 | gdb_regs[_R9] = ti->cpu_context.r9; |
96 | gdb_regs[_R6] = thread_regs->ARM_r6; | 96 | gdb_regs[_R10] = ti->cpu_context.sl; |
97 | gdb_regs[_R7] = thread_regs->ARM_r7; | 97 | gdb_regs[_FP] = ti->cpu_context.fp; |
98 | gdb_regs[_R8] = thread_regs->ARM_r8; | 98 | gdb_regs[_SPT] = ti->cpu_context.sp; |
99 | gdb_regs[_R9] = thread_regs->ARM_r9; | 99 | gdb_regs[_PC] = ti->cpu_context.pc; |
100 | gdb_regs[_R10] = thread_regs->ARM_r10; | ||
101 | gdb_regs[_FP] = thread_regs->ARM_fp; | ||
102 | gdb_regs[_IP] = thread_regs->ARM_ip; | ||
103 | gdb_regs[_SPT] = thread_regs->ARM_sp; | ||
104 | gdb_regs[_LR] = thread_regs->ARM_lr; | ||
105 | gdb_regs[_PC] = thread_regs->ARM_pc; | ||
106 | gdb_regs[_CPSR] = thread_regs->ARM_cpsr; | ||
107 | } | 100 | } |
108 | 101 | ||
109 | void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long pc) | 102 | void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long pc) |