From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25016 invoked by alias); 10 Sep 2002 21:26:24 -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 25006 invoked from network); 10 Sep 2002 21:26:24 -0000 Received: from unknown (HELO cygnus.com) (205.180.83.203) by sources.redhat.com with SMTP; 10 Sep 2002 21:26:24 -0000 Received: from redhat.com (reddwarf.sfbay.redhat.com [172.16.24.50]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id OAA06940; Tue, 10 Sep 2002 14:15:45 -0700 (PDT) Message-ID: <3D7E637E.ED5CDE47@redhat.com> Date: Tue, 10 Sep 2002 14:26:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. X-Accept-Language: en MIME-Version: 1.0 To: Daniel Jacobowitz CC: Andrew Cagney , Michael Snyder , gdb-patches@sources.redhat.com Subject: Re: [PATCH] mips_extract_struct_return_value: use saved regcache References: <200209051830.g85IUnA03382@reddwarf.sfbay.redhat.com> <3D7D70E4.8050803@ges.redhat.com> <3D7E5141.61481190@redhat.com> <20020910204402.GA4450@nevyn.them.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2002-09/txt/msg00157.txt.bz2 Daniel Jacobowitz wrote: > > On Tue, Sep 10, 2002 at 01:08:33PM -0700, Michael Snyder wrote: > > Andrew Cagney wrote: > > > > > > > ! mips_extract_struct_value_address (struct regcache *regcache) > > > > { > > > > /* FIXME: This will only work at random. The caller passes the > > > > struct_return address in V0, but it is not preserved. It may > > > > still be there, or this may be a random value. */ > > > > ! CORE_ADDR val; > > > > ! regcache_cooked_read_unsigned (regcache, V0_REGNUM, &val); > > > > ! return val; > > > > } > > > > > > FYI, > > > > > > This should be regcache_cooked_read_signed() so that the address is sign > > > extended. > > > > Are you sure? Arm, i386, and cris all use unsigned. > > I just copied them. > > Yes, Andrew's right - this is a quirk of MIPS. OK then -- I'll change it. Thanks (Daniel and Andrew) > > > > I think val should also be a LONGEST. > > > > OK, will change. > > > > -- > Daniel Jacobowitz > MontaVista Software Debian GNU/Linux Developer