From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9189 invoked by alias); 10 Sep 2002 20:43:53 -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 9178 invoked from network); 10 Sep 2002 20:43:53 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 10 Sep 2002 20:43:53 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 17osnb-0005tX-00; Tue, 10 Sep 2002 16:43:55 -0500 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 17orre-0001A6-00; Tue, 10 Sep 2002 16:44:02 -0400 Date: Tue, 10 Sep 2002 13:43:00 -0000 From: Daniel Jacobowitz To: Michael Snyder Cc: Andrew Cagney , Michael Snyder , gdb-patches@sources.redhat.com Subject: Re: [PATCH] mips_extract_struct_return_value: use saved regcache Message-ID: <20020910204402.GA4450@nevyn.them.org> Mail-Followup-To: Michael Snyder , Andrew Cagney , Michael Snyder , gdb-patches@sources.redhat.com References: <200209051830.g85IUnA03382@reddwarf.sfbay.redhat.com> <3D7D70E4.8050803@ges.redhat.com> <3D7E5141.61481190@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3D7E5141.61481190@redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-09/txt/msg00156.txt.bz2 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. > > I think val should also be a LONGEST. > > OK, will change. > -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer