From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14848 invoked by alias); 4 Jun 2003 21:45:49 -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 14744 invoked from network); 4 Jun 2003 21:45:47 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (62.163.169.212) by sources.redhat.com with SMTP; 4 Jun 2003 21:45:47 -0000 Received: from elgar.kettenis.dyndns.org (elgar.kettenis.dyndns.org [192.168.0.2]) by walton.kettenis.dyndns.org (8.12.6p2/8.12.5) with ESMTP id h54LjdYV000291; Wed, 4 Jun 2003 23:45:39 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (localhost [127.0.0.1]) by elgar.kettenis.dyndns.org (8.12.6p2/8.12.6) with ESMTP id h54LjZDd000515; Wed, 4 Jun 2003 23:45:35 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: (from kettenis@localhost) by elgar.kettenis.dyndns.org (8.12.6p2/8.12.6/Submit) id h54LjZkO000512; Wed, 4 Jun 2003 23:45:35 +0200 (CEST) To: Andrew Cagney Cc: gdb-patches@sources.redhat.com Subject: Re: [wip/rfc] Merge REGISTER_TO_VALUE and REGISTER_TO_TYPE References: <3EDE4A9E.70403@redhat.com> From: Mark Kettenis Date: Wed, 04 Jun 2003 21:45:00 -0000 In-Reply-To: Andrew Cagney's message of "Wed, 04 Jun 2003 15:38:06 -0400" Message-ID: <8665nl34ao.fsf@elgar.kettenis.dyndns.org> X-SW-Source: 2003-06/txt/msg00184.txt.bz2 Andrew Cagney writes: [snip] > With this in mind, I'm thinking that REGISTER_TO_TYPE and > REGISTER_TO_VALUE should be merged. To that end, I can see several ways > of doing it: > > - Don't merge - add REGISTER_TO_TYPE to the architecture vector > > - Retain the current logic - just apply REGISTER_TO_VALUE to values > stored across multiple registers > > - Add a frame parameter to REGISTER_TO_VALUE and make it responsible for > both extracting the bytes from the register[s] and then storing them in > the ``struct value''. > > The last option is interesting, it would let the target draw the value > from any register based on REGNUM. The i386 with its long-long problem > might be interested in this (you'll notice in the patch I made an > attempt at doing this only I didn't see it affect the test results). > > Thoughts? The last option is certainly attractive. The fact that this doesn't show any improvements in the testsuite, is because there is no test for `long long' in store.exp. There are tests for small structs there that will still fail since your implementation of i386_register_to_value isn't complete; it should also handle 8-byte strcutures stored in registers. Not just integers. Anyway, you can leave the i386-specific details to me if you prefer. Mark