Anyone using BDM to debug RTEMS on a 68332 platform?

Joel Sherrill joel.sherrill at OARcorp.com
Wed Apr 10 11:40:04 UTC 2002



Chris Johns wrote:
> 
> Mike Panetta wrote:
> 
> > I have been trying to debug a serial problem with the MRM port, related
> > to interrupt driven serial IO, but I have run into an unexpected problem
> > with (I suspect) GDB with the BDM driver.  It does not seem to be able
> > to report the correct values of some variables on the stack, but not all
> > the time.  I have tested that the value of the variable is what I think
> > it really is by doing a printk(), and it prints the correct value, but
> > display, or print will not in GDB.

If this is a local variable, then optimization is probably confusing
things.
You should try to trace on the PowerPC where you can step on the same 
two C lines over and over as the code is interwoven.

>  I can even dump the stack with x /4x
> > $sp and I can see what I expect is the correct value at the correct
> > location on the stack, but print still does not work.  So has anyone
> > else here used GDB + the BDM patch on a 68332 platform and experienced a
> > similar problem?
> 
> No. These all tend to be problems with the BDM hardware, the target
> hardware or inline code and data being in registers etc. Using c++ can
> make it even worse.


Chris I was using the MRM332 that Mike is when I emailed you back and
forth about it.  The BDM wasn't perfect but we had it working well
enough.  You had to be careful about initializing the board with
gdb commands so the memory could be loaded by gdb.  And you also 
had to explicitly tell gdb about the CPU. 

> > Has anyone experienced this problem on the ColdFire?
> 
> No. If something goes wrong on the target that is not handled cleanly
> such as a stack overrun or unhandled exception then this happens.
> 
> > Oh, and another GDB commnd that does not work properly is bt, because of
> > the same reason I suspect.
> 
> Are you sure the stack is where it should be and no extra fields have
> appeared due to an exception stack frame ?
> 
>  >
> 
> > My hunch is that the problem is related to
> > inline code confusing GDB, but thats only a guess, I have no real way to
> > test it.  I have tried, but could not reproduce the problem in my
> > limited test case.
> >
> 
> --
>   Chris Johns, cjohns at cybertec.com.au

-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel at OARcorp.com                 On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
   Support Available             (256) 722-9985



More information about the users mailing list