From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6680 invoked by alias); 7 Jun 2004 15:22:46 -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 6667 invoked from network); 7 Jun 2004 15:22:46 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 7 Jun 2004 15:22:46 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i57FMii7016420 for ; Mon, 7 Jun 2004 11:22:45 -0400 Received: from localhost.redhat.com (to-dhcp51.toronto.redhat.com [172.16.14.151]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i57FMh004249; Mon, 7 Jun 2004 11:22:43 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 13AD52B9D; Mon, 7 Jun 2004 11:22:43 -0400 (EDT) Message-ID: <40C48842.9020706@gnu.org> Date: Mon, 07 Jun 2004 15:22:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: Michael Snyder Cc: gdb-patches@sources.redhat.com, drow@false.org Subject: Re: [RFC/RFA] MIPS extract_return_value References: <40BFD27E.6080209@redhat.com> In-Reply-To: <40BFD27E.6080209@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-06/txt/msg00125.txt.bz2 > Hey Andrew, Daniel, > > I encountered another problem with 32/64 bit mips. Don't know if this > is the right way to fix it, but it illustrates it (and fixes several > hundred failures). > > The problem is that extract_return_value and store_return_value both > call return_value_location, but then one of them uses the raw register > and the other uses the cooked register (which are not the same size). > So the offset into the register cache, computed by > return_value_location, has to be wrong for one of them. The underlying problem here is that eabi (32 and 64) and o64 still use: set_gdbarch_deprecated_store_return_value (gdbarch, set_gdbarch_deprecated_extract_return_value (gdbarch, There should instead be separate eabi and o64 return_value methods (see mips_n32n64_return_value for an example). If this is done the return/finish code will really be fixed (and as a side effect return_value_location will be eliminated). Can that be done? > The simple-minded approach I've taken below is to add a parameter > to return_value_location, telling it whether to use the raw or cooked > registers. I've only tested it on one architecture (isa64 with gcc > -mips32), so consider it more of a suggestion than a patch. Just FYI, the code should just manipulate the cooked registers. Andrew