diff options
author | Jason Wessel <jason.wessel@windriver.com> | 2010-05-21 02:04:21 (GMT) |
---|---|---|
committer | Jason Wessel <jason.wessel@windriver.com> | 2010-05-21 02:04:21 (GMT) |
commit | dcc7871128e99458ca86186b7bc8bf27ff0c47b5 (patch) | |
tree | e10d252ccc4e990aac7dd09f44b94cfe045adc6b /arch/mips/kernel/kgdb.c | |
parent | 67fc4e0cb931d6b4ccf21248e4199b154478ecea (diff) | |
download | linux-fsl-qoriq-dcc7871128e99458ca86186b7bc8bf27ff0c47b5.tar.xz |
kgdb: core changes to support kdb
These are the minimum changes to the kgdb core in order to enable an
API to connect a new front end (kdb) to the debug core.
This patch introduces the dbg_kdb_mode variable controls where the
user level I/O is routed. It will be routed to the gdbstub (kgdb) or
to the kdb front end which is a simple shell available over the kgdboc
connection.
You can switch back and forth between kdb or the gdb stub mode of
operation dynamically. From gdb stub mode you can blindly type
"$3#33", or from the kdb mode you can enter "kgdb" to switch to the
gdb stub.
The logic in the debug core depends on kdb to look for the typical gdb
connection sequences and return immediately with KGDB_PASS_EVENT if a
gdb serial command sequence is detected. That should allow a
reasonably seamless transition between kdb -> gdb without leaving the
kernel exception state. The two gdb serial queries that kdb is
responsible for detecting are the "?" and "qSupported" packets.
CC: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Acked-by: Martin Hicks <mort@sgi.com>
Diffstat (limited to 'arch/mips/kernel/kgdb.c')
-rw-r--r-- | arch/mips/kernel/kgdb.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/mips/kernel/kgdb.c b/arch/mips/kernel/kgdb.c index 50c9bb8..6ed4c83 100644 --- a/arch/mips/kernel/kgdb.c +++ b/arch/mips/kernel/kgdb.c @@ -180,6 +180,11 @@ void sleeping_thread_to_gdb_regs(unsigned long *gdb_regs, struct task_struct *p) *(ptr++) = regs->cp0_epc; } +void kgdb_arch_set_pc(struct pt_regs *regs, unsigned long pc) +{ + regs->cp0_epc = pc; +} + /* * Calls linux_debug_hook before the kernel dies. If KGDB is enabled, * then try to fall into the debugger |