| To: | linux-kernel@xxxxxxxxxxxxxxx |
|---|---|
| Subject: | [PATCH 07/37] kgdb,sparc: Add in kgdb_arch_set_pc for sparc |
| From: | Jason Wessel <jason.wessel@xxxxxxxxxxxxx> |
| Date: | Wed, 23 Dec 2009 15:19:20 -0600 |
| Cc: | kgdb-bugreport@xxxxxxxxxxxxxxxxxxxxx, kdb@xxxxxxxxxxx, mingo@xxxxxxx, Jason Wessel <jason.wessel@xxxxxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx> |
| In-reply-to: | <1261603190-5036-7-git-send-email-jason.wessel@xxxxxxxxxxxxx> |
| References: | <1261603190-5036-1-git-send-email-jason.wessel@xxxxxxxxxxxxx> <1261603190-5036-2-git-send-email-jason.wessel@xxxxxxxxxxxxx> <1261603190-5036-3-git-send-email-jason.wessel@xxxxxxxxxxxxx> <1261603190-5036-4-git-send-email-jason.wessel@xxxxxxxxxxxxx> <1261603190-5036-5-git-send-email-jason.wessel@xxxxxxxxxxxxx> <1261603190-5036-6-git-send-email-jason.wessel@xxxxxxxxxxxxx> <1261603190-5036-7-git-send-email-jason.wessel@xxxxxxxxxxxxx> |
The new debug core api requires all architectures that use to debug
core to implement a function to set the program counter.
CC: "David S. Miller" <davem@xxxxxxxxxxxxx>
Signed-off-by: Jason Wessel <jason.wessel@xxxxxxxxxxxxx>
---
arch/sparc/kernel/kgdb_32.c | 6 ++++++
arch/sparc/kernel/kgdb_64.c | 6 ++++++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/arch/sparc/kernel/kgdb_32.c b/arch/sparc/kernel/kgdb_32.c
index 04df4ed..79bcba6 100644
--- a/arch/sparc/kernel/kgdb_32.c
+++ b/arch/sparc/kernel/kgdb_32.c
@@ -158,6 +158,12 @@ void kgdb_arch_exit(void)
{
}
+void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long ip)
+{
+ regs->pc = regs->npc;
+ regs->npc = ip;
+}
+
struct kgdb_arch arch_kgdb_ops = {
/* Breakpoint instruction: ta 0x7d */
.gdb_bpt_instr = { 0x91, 0xd0, 0x20, 0x7d },
diff --git a/arch/sparc/kernel/kgdb_64.c b/arch/sparc/kernel/kgdb_64.c
index f5a0fd4..ebe9f0b 100644
--- a/arch/sparc/kernel/kgdb_64.c
+++ b/arch/sparc/kernel/kgdb_64.c
@@ -180,6 +180,12 @@ void kgdb_arch_exit(void)
{
}
+void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long ip)
+{
+ regs->tpc = regs->tnpc;
+ regs->tnpc = ip;
+}
+
struct kgdb_arch arch_kgdb_ops = {
/* Breakpoint instruction: ta 0x72 */
.gdb_bpt_instr = { 0x91, 0xd0, 0x20, 0x72 },
--
1.6.4.rc1
|
| Previous by Date: | [PATCH 13/37] kgdb,8250,pl011: Return immediately from console poll, Jason Wessel |
|---|---|
| Next by Date: | [PATCH 26/37] keyboard, input: Add hook to input to allow low level event clear, Jason Wessel |
| Previous by Thread: | [PATCH 06/37] kgdb: eliminate kgdb_wait(), all cpus enter the same way, Jason Wessel |
| Next by Thread: | [PATCH 08/37] kgdb,sh: update superh kgdb exception handling, Jason Wessel |
| Indexes: | [Date] [Thread] [Top] [All Lists] |