From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25349 invoked by alias); 30 May 2013 13:18:46 -0000 Mailing-List: contact gdb-prs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-prs-owner@sourceware.org Received: (qmail 25324 invoked by uid 48); 30 May 2013 13:18:45 -0000 From: "luis_gustavo at mentor dot com" To: gdb-prs@sourceware.org Subject: [Bug gdb/15550] New: powerpc gdb does not use Tag_GNU_Power_ABI_Struct_Return Date: Thu, 30 May 2013 13:18:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: gdb X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: luis_gustavo at mentor dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-q2/txt/msg00334.txt.bz2 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.