From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3051 invoked by alias); 24 Apr 2003 03:46:27 -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 3037 invoked from network); 24 Apr 2003 03:46:26 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 24 Apr 2003 03:46:26 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 198Xh3-0007w0-00; Wed, 23 Apr 2003 22:46:41 -0500 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 198Xgm-0001tz-00; Wed, 23 Apr 2003 23:46:24 -0400 Date: Thu, 24 Apr 2003 15:53:00 -0000 From: Daniel Jacobowitz To: Kevin Buettner Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] dwarf2expr.c: Prepare for eventual DW_OP_piece support Message-ID: <20030424034624.GA7249@nevyn.them.org> Mail-Followup-To: Kevin Buettner , gdb-patches@sources.redhat.com References: <1030424010535.ZM18157@localhost.localdomain> <1030424011351.ZM18193@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1030424011351.ZM18193@localhost.localdomain> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-04/txt/msg00463.txt.bz2 On Wed, Apr 23, 2003 at 06:13:52PM -0700, Kevin Buettner wrote: > On Apr 23, 6:05pm, Kevin Buettner wrote: > > > ... prepares execute_stack_op() for eventual DW_OP_piece > > support. > > I have a patch which adds _limited_ DW_OP_piece support. It finds the > various "pieces" (all of which must be registers) in the location > expression and then calls an architecture specific method to determine > whether, given a single register number, gdb can reliably fetch the > necessary pieces. The architecture dependent method simply checks to > make sure that the register numbers (the pieces) are in the correct > order and it returns the register number that must be used in order to > properly fetch the pieces (or -1 if it can't be done). > > This support doesn't handle the interesting case of an object being > split between a register and memory or even of the slightly less > interesting case of non-contiguous registers, but it will be adequate > for most DW_OP_piece expressions that gcc will emit in the near > future. Anyway... given the limitations outlined above, is there > interest in having me submit this patch? Ah, sounds like our friend the e500. I think that you should submit the patch, personally. Note that we can make GCC emit more DW_OP_piece information in, probably, a heartbeat or so. Once GDB's ready for it. The movement of ctx->in_reg out of the loop is appropriate only for the limited DW_OP_piece support you describe above; but it's in the loop for exactly the reason of values split between registers and memory. In order to support this locations need to become more complete objects. I have a plan of attack, but no time. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer