m68k-coff SP changing

Toshi Morita tm2@best.com
Tue Apr 3 23:25:00 GMT 2001


Nick Papadonis <npapadon@yahoo.com> wrote:

> Richard Henderson <rth@redhat.com> writes:
> 
> > On Tue, Apr 03, 2001 at 12:13:28PM -0400, Nick Papadonis wrote:
> > > Does anyone know why the following instructions change my SP?
> > > My target is m68k-coff.
> > 
> > No.  You've not given us enough to reproduce the problem.
> > 
> > 
> > r~
> > 
> 
> Here is my test case.  Compile, and step through.  Examine the stack
> pointer.  My target is a m68331 MCU.  The exception vectors are all
> NULL except for RESET - INIT SP and RESET - INIT PC. 
> 

I think you're forgetting the GDB stub. It needs an exception vector
to single-step.

I suspect you're not saving and restoring registers properly in
the GDB stub, because your stack is being depressed on each instruction.

It could be another exception such as an interrupt, though.

> 
> Any insight appreciated.  Thanks.

See above.

> - Nick

Toshi




More information about the Binutils mailing list