summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2002-02-08 23:27:26 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2002-02-08 23:27:26 +0000
commit6953e68e51ce02dcfdb83a8a9033f962ae64c97d (patch)
tree2e7ed8da5d89b2e7f68ae37e38d0add14faa71e6 /c
parent63bce6324d794ca624039a3b4578ca7533ba86a6 (diff)
downloadrtems-6953e68e51ce02dcfdb83a8a9033f962ae64c97d.tar.bz2
2002-02-08 Joel Sherrill <joel@OARcorp.com>
* mips-stub.c (handle_exception): Prototype changed to be an RTEMS entry point. Added comments about possible need to flush cache. (mips_gdb_stub_install): New routine.
Diffstat (limited to 'c')
-rw-r--r--c/src/lib/libbsp/mips/shared/gdbstub/ChangeLog6
-rw-r--r--c/src/lib/libbsp/mips/shared/gdbstub/mips-stub.c25
2 files changed, 29 insertions, 2 deletions
diff --git a/c/src/lib/libbsp/mips/shared/gdbstub/ChangeLog b/c/src/lib/libbsp/mips/shared/gdbstub/ChangeLog
index 1fd3679b3f..3ee2b5418a 100644
--- a/c/src/lib/libbsp/mips/shared/gdbstub/ChangeLog
+++ b/c/src/lib/libbsp/mips/shared/gdbstub/ChangeLog
@@ -1,5 +1,11 @@
2002-02-08 Joel Sherrill <joel@OARcorp.com>
+ * mips-stub.c (handle_exception): Prototype changed to be an RTEMS
+ entry point. Added comments about possible need to flush cache.
+ (mips_gdb_stub_install): New routine.
+
+2002-02-08 Joel Sherrill <joel@OARcorp.com>
+
* Makefile, stubinit.S, r46kstub.ld, ioaddr.h: Removed as unused
with RTEMS.
* r46kstub.c: Renamed to mips-stub.c.
diff --git a/c/src/lib/libbsp/mips/shared/gdbstub/mips-stub.c b/c/src/lib/libbsp/mips/shared/gdbstub/mips-stub.c
index 5eb8b78355..6ff496a050 100644
--- a/c/src/lib/libbsp/mips/shared/gdbstub/mips-stub.c
+++ b/c/src/lib/libbsp/mips/shared/gdbstub/mips-stub.c
@@ -779,8 +779,7 @@ computeSignal (void)
* it figures out why it was activated and tells gdb, and then it
* reacts to gdb's requests.
*/
-void
-handle_exception (CPU_Interrupt_frame *frame)
+void handle_exception (rtems_vector_number vector, CPU_Interrupt_frame *frame)
{
int host_has_detached = 0;
int sigval;
@@ -906,5 +905,27 @@ handle_exception (CPU_Interrupt_frame *frame)
/* reply to the request */
putpacket (outBuffer);
}
+
+ /*
+ * The original code did this in the assembly wrapper. We should consider
+ * doing it here before we return.
+ *
+ * On exit from the exception handler invalidate each line in the I-cache
+ * and write back each dirty line in the D-cache. This needs to be done
+ * before the target program is resumed in order to ensure that software
+ * breakpoints and downloaded code will actually take effect.
+ */
+
return;
}
+
+void mips_gdb_stub_install(void)
+{
+ rtems_isr_entry old;
+
+ rtems_interrupt_catch( (rtems_isr_entry) handle_exception, MIPS_EXCEPTION_SYSCALL, &old );
+ /* rtems_interrupt_catch( handle_exception, MIPS_EXCEPTION_BREAK, &old ); */
+
+ /* get the attention of gdb */
+ mips_break();
+}