From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18326 invoked by alias); 9 Jun 2003 14:20:56 -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 18009 invoked from network); 9 Jun 2003 14:20:46 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.131) by sources.redhat.com with SMTP; 9 Jun 2003 14:20:46 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 854AE2B63; Mon, 9 Jun 2003 10:20:44 -0400 (EDT) Message-ID: <3EE497BC.6050601@redhat.com> Date: Mon, 09 Jun 2003 14:20:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mark Kettenis Cc: gdb-patches@sources.redhat.com Subject: Re: [cagney_convert-20030606-branch] Add value to REGISTER_TO_VALUE et.al. References: <3EDE4A9E.70403@redhat.com> <8665nl34ao.fsf@elgar.kettenis.dyndns.org> <3EE0D987.6030207@redhat.com> <200306081643.h58GhiTr048427@elgar.kettenis.dyndns.org> <3EE36F28.9000104@redhat.com> <3EE3B455.7080902@redhat.com> <200306090938.h599cg5F000458@elgar.kettenis.dyndns.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-06/txt/msg00298.txt.bz2 > Date: Sun, 08 Jun 2003 18:10:29 -0400 > From: Andrew Cagney > > Ok, I've changed the branch to: > > > The ``obvious'' interfaces were: > > > > register_to_value (frame, regnum, type, buffer) > > value_to_register (frame, regnum, type, buffer) > > > > but that tripped up on something (now what ...?). Dig dig. > > Notice how, to preserve existing behavior, > > legacy_register_to_value saves the location based on what > > frame_register returns. We'd have to switch to > > lval_reg_frame_relative. > > And this time it appears to be going better. I'll try to attribute it > to VALUE_FRAME_ID and the use of put_frame_register (neither of which I > did last time). > > Andrew, the attached fixes writing values into registers. OK to check > this in on the branch? Yep, thanks! Andrew > Index: ChangeLog > from Mark Kettenis > > * valops.c (value_assign): Assign contents of FROMVAL instead of > TOVAL. > > Index: valops.c > =================================================================== > RCS file: /cvs/src/src/gdb/valops.c,v > retrieving revision 1.110.2.2 > diff -u -p -r1.110.2.2 valops.c > --- valops.c 8 Jun 2003 22:14:42 -0000 1.110.2.2 > +++ valops.c 9 Jun 2003 09:02:27 -0000 > @@ -588,13 +588,12 @@ value_assign (struct value *toval, struc > error ("Value being assigned to is no longer active."); > > if (VALUE_LVAL (toval) == lval_reg_frame_relative > - && CONVERT_REGISTER_P (VALUE_FRAME_REGNUM (toval), > - VALUE_TYPE (toval))) > + && CONVERT_REGISTER_P (VALUE_FRAME_REGNUM (toval), type)) > { > /* If TOVAL is a special machine register requiring > conversion of program values to a special raw format. */ > VALUE_TO_REGISTER (frame, VALUE_FRAME_REGNUM (toval), > - VALUE_TYPE (toval), VALUE_CONTENTS (toval)); > + type, VALUE_CONTENTS (fromval)); > } > else > { >