From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29353 invoked by alias); 26 Oct 2011 21:37:45 -0000 Received: (qmail 29342 invoked by uid 22791); 26 Oct 2011 21:37:44 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 26 Oct 2011 21:37:30 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 082D32BB413; Wed, 26 Oct 2011 17:37:30 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id DP-FHZO7JcSG; Wed, 26 Oct 2011 17:37:29 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 992432BB3B0; Wed, 26 Oct 2011 17:37:29 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id A7ECF145615; Wed, 26 Oct 2011 17:37:26 -0400 (EDT) Date: Wed, 26 Oct 2011 21:44:00 -0000 From: Joel Brobecker To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [RFA/RFC] Restore old handling of multi-register variables Message-ID: <20111026213726.GV19246@adacore.com> References: <1317675787-7351-1-git-send-email-brobecker@adacore.com> <201110252002.38708.pedro@codesourcery.com> <20111025203022.GQ19246@adacore.com> <201110252149.34078.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201110252149.34078.pedro@codesourcery.com> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-10/txt/msg00710.txt.bz2 Here is a new version of the patch that reads values over multiple registers if needed. You suggested that read_frame_register_value should be in frame.c, but it seemed more logical to put it in findvar. I think that the proximity with the ther frame_register routines made it more natural, whereas I couldn't find a natural place where the new routine would fit in frame.c. But I can move it to frame.c if you think it's a better place. I have also started looking at converting the register_to_value gdbarch method to using values instead of buffer and a couple of parameters. Not very difficult, but not trivial either. That makes me worried about introducing bugs during the conversion, and I won't be able to test most configurations. I'll send a patch as a follow-up email to this one. It's not complete, but gives us an idea, and we can decide whether we want to continue or not (FYI: I will have very little time for this within the next couple of weeks). gdb/ChangeLog: * value.h (read_frame_register_value): Add declaration. * findvar.c (read_frame_register_value): New function. (value_from_register): Use read_frame_register_value instead of get_frame_register_value + value_contents_copy to get value contents. Tested on AVR using AdaCore's testsuite. Tested on x86_64-linux using the official testsuite. OK? Thanks, -- Joel