rtems gdb stub with virtex issue

Till Straumann strauman at slac.stanford.edu
Tue Feb 5 19:12:27 UTC 2008


Tim Cussins wrote:
> 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
I recently added a similar test to support e500 PPCs
(quite similiar to the 405)
>  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.
What makes you believe that? The stub only sets/removes
breakpoints on behalf of gdb. The only exception being when
it is asked to single-step over an existing breakpoint.
In that case, the breakpoint is repaced by the original
instruction which is subsequently executed and again
replaced by the breakpoint.

gdb usually lets the stub insert breakpoints before
issuing 'cont' or 'step' and removes them from the target
as soon as it gains control (but would re-insert them
before issuing 'cont' again).

What version of gdb are you using?

- T.
>  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;
> _______________________________________________
> rtems-users mailing list
> rtems-users at rtems.com
> http://rtems.rtems.org/mailman/listinfo/rtems-users
>   





More information about the users mailing list