This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug gdb/15550] New: powerpc gdb does not use Tag_GNU_Power_ABI_Struct_Return
- From: "luis_gustavo at mentor dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Thu, 30 May 2013 13:18:44 +0000
- Subject: [Bug gdb/15550] New: powerpc gdb does not use Tag_GNU_Power_ABI_Struct_Return
- Auto-submitted: auto-generated
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.