From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32641 invoked by alias); 5 Sep 2002 18:30:51 -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 32631 invoked from network); 5 Sep 2002 18:30:50 -0000 Received: from unknown (HELO cygnus.com) (205.180.83.203) by sources.redhat.com with SMTP; 5 Sep 2002 18:30:50 -0000 Received: from reddwarf.sfbay.redhat.com (reddwarf.sfbay.redhat.com [172.16.24.50]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id LAA02819; Thu, 5 Sep 2002 11:21:30 -0700 (PDT) Received: (from msnyder@localhost) by reddwarf.sfbay.redhat.com (8.11.2/8.11.2) id g85IUnA03382; Thu, 5 Sep 2002 11:30:49 -0700 Date: Thu, 05 Sep 2002 11:30:00 -0000 From: Michael Snyder Message-Id: <200209051830.g85IUnA03382@reddwarf.sfbay.redhat.com> To: gdb-patches@sources.redhat.com Subject: [PATCH] mips_extract_struct_return_value: use saved regcache Cc: cagney@redhat.com X-SW-Source: 2002-09/txt/msg00070.txt.bz2 (obvious) 2002-09-05 Michael Snyder * mips-tdep.c (mips_extract_struct_value_address): Retrieve V0_REGNUM from saved regcache, not from current regcache. Index: mips-tdep.c =================================================================== RCS file: /cvs/src/src/gdb/mips-tdep.c,v retrieving revision 1.119 diff -p -r1.119 mips-tdep.c *** mips-tdep.c 24 Aug 2002 00:21:35 -0000 1.119 --- mips-tdep.c 5 Sep 2002 18:27:42 -0000 *************** mips_store_struct_return (CORE_ADDR addr *** 4906,4917 **** } static CORE_ADDR ! mips_extract_struct_value_address (struct regcache *ignore) { /* 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. */ ! return read_register (V0_REGNUM); } /* Exported procedure: Is PC in the signal trampoline code */ --- 4902,4915 ---- } static CORE_ADDR ! 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; } /* Exported procedure: Is PC in the signal trampoline code */