[RFA] mn10300-tdep.c: Always write return address to MDR register on push_dummy_call

Corinna Vinschen vinschen@redhat.com
Thu Mar 2 09:31:00 GMT 2006


On Mar  1 12:26, Michael Snyder wrote:
> Corinna Vinschen wrote:
> >Hi,
> >
> >the mn10300 hardware always writes the return address to the stack and
> >into the MDR register when any "call" machine instruction is executed.
> >The mn10300_push_dummy_call function does only write the return address
> >to the stack, which might result into problems when leaf functions are
> >called and the MDR register is known not to be clobbered by "mul" or
> >"div" instructions.  The below patch also writes the return address
> >always into the MDR register, like the hardware.
> >
> >Ok to apply?
> 
> Ha, yes, nice catch.   ;-)

Thanks, applied.

> >	* mn10300-tdep.c (mn10300_push_dummy_call): Write breakpoint
> >	address to MDR register.


Corinna

-- 
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat



More information about the Gdb-patches mailing list