From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18764 invoked by alias); 10 Sep 2002 04:11:26 -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 18744 invoked from network); 10 Sep 2002 04:11:23 -0000 Received: from unknown (HELO localhost.redhat.com) (24.112.240.27) by sources.redhat.com with SMTP; 10 Sep 2002 04:11:23 -0000 Received: from ges.redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 028F43F43; Tue, 10 Sep 2002 00:11:17 -0400 (EDT) Message-ID: <3D7D70E4.8050803@ges.redhat.com> Date: Mon, 09 Sep 2002 21:11:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.0) Gecko/20020824 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Michael Snyder Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] mips_extract_struct_return_value: use saved regcache References: <200209051830.g85IUnA03382@reddwarf.sfbay.redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-09/txt/msg00144.txt.bz2 > ! 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. I think val should also be a LONGEST. Andrew