From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9694 invoked by alias); 25 Nov 2003 22:15:03 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 9666 invoked from network); 25 Nov 2003 22:15:01 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 25 Nov 2003 22:15:01 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu-dmz.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id hAPMEoH02553 for ; Tue, 25 Nov 2003 17:14:50 -0500 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id hAPMEla23875; Tue, 25 Nov 2003 17:14:47 -0500 Received: from redhat.com (reddwarf.sfbay.redhat.com [172.16.24.50]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id hAPMElH18754; Tue, 25 Nov 2003 14:14:47 -0800 Message-ID: <3FC3D457.4050407@redhat.com> Date: Tue, 25 Nov 2003 22:15:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andrew Cagney CC: gdb-patches@sources.redhat.com, cagney , Eric Christopher Subject: Re: [RFA] mips-o64-extract-return-value References: <3FBC13EC.1040202@redhat.com> <3FBC1782.3000908@gnu.org> In-Reply-To: <3FBC1782.3000908@gnu.org> Content-Type: multipart/mixed; boundary="------------050904070504090908080904" X-SW-Source: 2003-11/txt/msg00580.txt.bz2 This is a multi-part message in MIME format. --------------050904070504090908080904 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 426 Andrew Cagney wrote: >> Hi Andrew, >> >> This change fixes 100s of FAILs for mips64-elf, 'cause gdb can't >> find the function's return value. It follows some work that you >> were apparently doing w.r.t. the mips internal register representation. >> >> I suspect that the same thing needs to be done for mips_eabi_extract..., >> but I haven't tested that. What do you think? > > > Ok. Amended and committed as follows: --------------050904070504090908080904 Content-Type: text/plain; name="mips" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="mips" Content-length: 1968 2003-11-25 Michael Snyder * mips-tdep.c (mips_o64_extract_return_value): Correct for NUM_REGS (see changes 2003-06-21). (mips_eabi_extract_return_value): Ditto. Index: mips-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mips-tdep.c,v retrieving revision 1.261 diff -p -r1.261 mips-tdep.c *** mips-tdep.c 23 Nov 2003 21:49:12 -0000 1.261 --- mips-tdep.c 25 Nov 2003 22:14:08 -0000 *************** mips_eabi_extract_return_value (struct t *** 4696,4707 **** return_value_location (valtype, &hi, &lo); memcpy (valbuf + lo.buf_offset, ! regbuf + DEPRECATED_REGISTER_BYTE (lo.reg) + lo.reg_offset, lo.len); if (hi.len > 0) memcpy (valbuf + hi.buf_offset, ! regbuf + DEPRECATED_REGISTER_BYTE (hi.reg) + hi.reg_offset, hi.len); } --- 4696,4707 ---- return_value_location (valtype, &hi, &lo); memcpy (valbuf + lo.buf_offset, ! regbuf + DEPRECATED_REGISTER_BYTE (NUM_REGS + lo.reg) + lo.reg_offset, lo.len); if (hi.len > 0) memcpy (valbuf + hi.buf_offset, ! regbuf + DEPRECATED_REGISTER_BYTE (NUM_REGS + hi.reg) + hi.reg_offset, hi.len); } *************** mips_o64_extract_return_value (struct ty *** 4715,4726 **** return_value_location (valtype, &hi, &lo); memcpy (valbuf + lo.buf_offset, ! regbuf + DEPRECATED_REGISTER_BYTE (lo.reg) + lo.reg_offset, lo.len); if (hi.len > 0) memcpy (valbuf + hi.buf_offset, ! regbuf + DEPRECATED_REGISTER_BYTE (hi.reg) + hi.reg_offset, hi.len); } --- 4715,4726 ---- return_value_location (valtype, &hi, &lo); memcpy (valbuf + lo.buf_offset, ! regbuf + DEPRECATED_REGISTER_BYTE (NUM_REGS + lo.reg) + lo.reg_offset, lo.len); if (hi.len > 0) memcpy (valbuf + hi.buf_offset, ! regbuf + DEPRECATED_REGISTER_BYTE (NUM_REGS + hi.reg) + hi.reg_offset, hi.len); } --------------050904070504090908080904--