diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1997-03-25 23:40:36 +0000 |
---|---|---|
committer | <ralf@linux-mips.org> | 1997-03-25 23:40:36 +0000 |
commit | 7206675c40394c78a90e74812bbdbf8cf3cca1be (patch) | |
tree | 251895cf5a0008e2b4ce438cb01ad4d55fb5b97b /arch/mips/kernel/gdb-stub.c | |
parent | beb116954b9b7f3bb56412b2494b562f02b864b1 (diff) |
Import of Linux/MIPS 2.1.14.2
Diffstat (limited to 'arch/mips/kernel/gdb-stub.c')
-rw-r--r-- | arch/mips/kernel/gdb-stub.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/arch/mips/kernel/gdb-stub.c b/arch/mips/kernel/gdb-stub.c index 9a3240152..13bf353ff 100644 --- a/arch/mips/kernel/gdb-stub.c +++ b/arch/mips/kernel/gdb-stub.c @@ -68,10 +68,10 @@ #include <linux/signal.h> #include <linux/kernel.h> -#include <asm/addrspace.h> #include <asm/asm.h> #include <asm/mipsregs.h> -#include <asm/cache.h> +#include <asm/segment.h> +#include <asm/cachectl.h> #include <asm/system.h> #include <asm/gdb-stub.h> @@ -326,7 +326,10 @@ static struct hard_trap_info void set_debug_traps(void) { struct hard_trap_info *ht; + unsigned long flags; + unsigned char c; + save_flags(flags); cli(); for (ht = hard_trap_info; ht->tt && ht->signo; ht++) set_except_vector(ht->tt, trap_low); @@ -334,9 +337,14 @@ void set_debug_traps(void) * In case GDB is started before us, ack any packets * (presumably "$?#xx") sitting there. */ + while((c = getDebugChar()) != '$'); + while((c = getDebugChar()) != '#'); + c = getDebugChar(); /* eat first csum byte */ + c = getDebugChar(); /* eat second csum byte */ + putDebugChar('+'); /* ack it */ - putDebugChar ('+'); initialized = 1; + restore_flags(flags); breakpoint(); } @@ -605,7 +613,7 @@ void handle_exception (struct gdb_regs *regs) * NB: We flush both caches, just to be sure... */ - cacheflush((void *)KSEG0, KSEG1-KSEG0, CF_BCACHE|CF_ALL); + flush_cache_all(); return; /* NOTREACHED */ break; |