From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17652 invoked by alias); 22 Aug 2002 22:26:09 -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 17644 invoked from network); 22 Aug 2002 22:26:08 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 22 Aug 2002 22:26:08 -0000 Received: by localhost.redhat.com (Postfix, from userid 469) id 928F010DCC; Thu, 22 Aug 2002 18:24:14 -0400 (EDT) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15717.25741.975036.591374@localhost.redhat.com> Date: Thu, 22 Aug 2002 15:28:00 -0000 To: Andrew Cagney Cc: Elena Zannoni , gdb-patches@sources.redhat.com Subject: Re: [RFA/rfc] blockframe.c: dummy frames unwind and pseudoregs In-Reply-To: <3D652ACB.70209@ges.redhat.com> References: <15717.1260.204796.69744@localhost.redhat.com> <3D652ACB.70209@ges.redhat.com> X-SW-Source: 2002-08/txt/msg00728.txt.bz2 Ok, I committed this: Index: blockframe.c =================================================================== RCS file: /cvs/uberbaum/gdb/blockframe.c,v retrieving revision 1.37 diff -u -p -r1.37 blockframe.c --- blockframe.c 18 Aug 2002 22:40:15 -0000 1.37 +++ blockframe.c 22 Aug 2002 22:23:15 -0000 @@ -1402,11 +1402,10 @@ generic_call_dummy_register_unwind (stru #endif gdb_assert (registers != NULL); /* Return the actual value. */ - /* FIXME: cagney/2002-06-26: This should be via the - gdbarch_register_read() method so that it, on the fly, + /* Use the regcache_cooked_read() method so that it, on the fly, constructs either a raw or pseudo register from the raw register cache. */ - regcache_raw_read (registers, regnum, bufferp); + regcache_cooked_read (registers, regnum, bufferp); } } Andrew Cagney writes: > > > This is because the generic_call_dummy_register_unwind() doesn't deal with > > pseudo registers. It has this comment: > > > > /* Return the actual value. */ > > /* FIXME: cagney/2002-06-26: This should be via the > > gdbarch_register_read() method so that it, on the fly, > > constructs either a raw or pseudo register from the raw > > register cache. */ > > regcache_raw_read (registers, regnum, bufferp); > > > > > > If instead of raw reads I do cooked reads, I don't get the error. I > > wonder though if, based of the comment, this could be a problem for > > other targets. > > Thoughts? > > Two architecture features could cause problems: > - where an architecture has different sized raw and virtual (pre-cursor > to cooked) registers > - where there are pseudo registers > > MIPS has has different sized raw and virtual registers and, suprise!, > doesn't use the code in question. > > That code block definitly needs to read the cooked value. The only > potential problem is with: > http://sources.redhat.com/ml/gdb/2002-08/msg00196.html > and there, I think your case adds support to the argument that the dummy > frame code should save (readonly) cooked values. > > Given this, yes, ok. > > BTW, don't forget to update the comment :-) > > Andrew > > > > > 2002-08-22 Elena Zannoni > > > > * blockframe.c (generic_call_dummy_register_unwind): Use > > regcache_cooked_read to catch cases in which the variable is > > stored in a pseudo register. > > > > Index: blockframe.c > > =================================================================== > > RCS file: /cvs/uberbaum/gdb/blockframe.c,v > > retrieving revision 1.37 > > diff -u -p -r1.37 blockframe.c > > --- blockframe.c 18 Aug 2002 22:40:15 -0000 1.37 > > +++ blockframe.c 22 Aug 2002 15:35:27 -0000 > > @@ -1406,7 +1406,7 @@ generic_call_dummy_register_unwind (stru > > gdbarch_register_read() method so that it, on the fly, > > constructs either a raw or pseudo register from the raw > > register cache. */ > > - regcache_raw_read (registers, regnum, bufferp); > > + regcache_cooked_read (registers, regnum, bufferp); > > } > > } > > >