public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug gdb/15550] New: powerpc gdb does not use Tag_GNU_Power_ABI_Struct_Return
@ 2013-05-30 13:18 luis_gustavo at mentor dot com
0 siblings, 0 replies; only message in thread
From: luis_gustavo at mentor dot com @ 2013-05-30 13:18 UTC (permalink / raw)
To: gdb-prs
http://sourceware.org/bugzilla/show_bug.cgi?id=15550
Bug ID: 15550
Summary: powerpc gdb does not use
Tag_GNU_Power_ABI_Struct_Return
Product: gdb
Version: HEAD
Status: NEW
Severity: minor
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: luis_gustavo at mentor dot com
Although powerpc has a valid attribute Tag_GNU_Power_ABI_Struct_Return in
binutils, it is not taken into account by GDB to handle the struct return
convention for a specific target.
Small structures can be returned either in registers (r3/r4) or in memory.
--
/* For historic reasons, PPC 32 GNU/Linux follows PowerOpen rather
than the 32 bit SYSV R4 ABI structure return convention - all
structures, no matter their size, are put in memory. Vectors,
which were added later, do get returned in a register though. */
static enum return_value_convention
ppc_linux_return_value (struct gdbarch *gdbarch, struct value *function,
struct type *valtype, struct regcache *regcache,
gdb_byte *readbuf, const gdb_byte *writebuf)
{
if ((TYPE_CODE (valtype) == TYPE_CODE_STRUCT
|| TYPE_CODE (valtype) == TYPE_CODE_UNION)
&& !((TYPE_LENGTH (valtype) == 16 || TYPE_LENGTH (valtype) == 8)
&& TYPE_VECTOR (valtype)))
return RETURN_VALUE_STRUCT_CONVENTION;
else
return ppc_sysv_abi_return_value (gdbarch, function, valtype, regcache,
readbuf, writebuf);
}
--
The code above will return all the non-vector structures through memory, small
vector structures (8 or 16 bytes in length) in registers and big vector
structures in memory.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-05-30 13:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-30 13:18 [Bug gdb/15550] New: powerpc gdb does not use Tag_GNU_Power_ABI_Struct_Return luis_gustavo at mentor dot com
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).