[m68k] fix return value extraction
Nathan Sidwell
nathan@codesourcery.com
Mon Jun 5 15:26:00 GMT 2006
I discovered gdb's idea of how values are returned differed significantly from
how gcc actually returned things. Although gcc might be at variance from the
ABI specification, I didn't want to change gcc's behaviour and thereby introduce
ABI incompatibilities there. AFAICT gcc's behaviour has been unchanged for a while.
*) GCC passes smalls structs that have an integral mode in a register, not small
structs per se. It is annoying that an implementation detail of gcc's internals
is affecting the ABI this way. I've reproduced what I think is an equivalent
algorithm, so gdb can determine this.
*) GCC never sets %a0 to point to a returned structure. Neither does it return
pointer values in %a0.
*) coldfire chips really need the stack to be aligned to a 4 byte boundary.
*) In order for bare metal elf to work, I've defaulted gdb's configuration to be
that, and added an os initialization routine for a.out.
*) I've enabled the linux sniffers for a uclinux target.
tested on a coldfire target board bare metal.
ok?
nathan
--
Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery
nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: call-ret.patch
Type: text/x-patch
Size: 12623 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20060605/63faf72a/attachment.bin>
More information about the Gdb-patches
mailing list