[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

rtems gdb stub with virtex issue



Hi all

I've been looking at using Till's gdb stub for rtems, running on
the virtex bsp (ppc405).

In order to support the ppc, I've added conditional compilation
for fp related chicanery, and tweaked the handling of a machine
check, nothing fancy (see diff below).

Question: I've set a breakpoint, my thread has hit it and stopped.
At this point the breakpoint is 'disabled' by the stub. However,
when I issue 'continue' to gdb, the breakpoint is not re-enabled.
Is this normal? Which end (stub or client) is required to re-enable
the breakpoint? The client (gdb) thinks the breakpoint still exists
and is enabled, which isn't true on the device...

Cheers,
Tim


[rtems-gdb-stub-ppc-shared.c]
@@ -124,9, +124,11 @@

      if ( (tcb = get_tcb(msg->tid)) ) {
-         Context_Control_fp *fpc = tcb->fp_context;
+         #if (CPU_HARDWARE_FP == TRUE && CPU_SOFTWARE_FP == TRUE )
+         Context_Control_fp *fpc = tcb->fp_context;
          if ( fpc ) {
              memcpy(buf + FPR0_OFF, &fpc->f[0], 32*8 );
              memcpy(buf + FPSCR_OFF, &fpc->fpscr, 4);
          }
+         #endif
          if (!f) {
              Frame        sfr = (Frame)tcb->Registers.gpr1;
@@ -163,4, +165,5 @@

      if ( msg->tid && (tcb = get_tcb(msg->tid)) ) {
+         #if (CPU_HARDWARE_FP == TRUE && CPU_SOFTWARE_FP == TRUE )
          Context_Control_fp *fpc = tcb->fp_context;
          if ( fpc ) {
@@ -169,4, +172,5 @@
              memcpy(&fpc->fpscr,  buf + FPSCR_OFF, 4);
          }
+         #endif
          if ( !f ) {
              /* setup TCB */
@@ -241,5, +245,4 @@
      switch ( f->_EXC_number ) {
          case ASM_MACH_VECTOR     :
-             _BSP_clear_hostbridge_errors(1,0);
              msg.sig = SIGBUS;
          break;