From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17646 invoked by alias); 14 Apr 2005 18:46:19 -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 17629 invoked from network); 14 Apr 2005 18:46:15 -0000 Received: from unknown (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org with SMTP; 14 Apr 2005 18:46:15 -0000 Received: from elgar.sibelius.xs4all.nl (root@elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.0/8.13.0) with ESMTP id j3EIkAPQ005955; Thu, 14 Apr 2005 20:46:10 +0200 (CEST) Received: from elgar.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.13.4/8.13.3) with ESMTP id j3EIkANv009522; Thu, 14 Apr 2005 20:46:10 +0200 (CEST) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.4/8.13.4/Submit) id j3EIkAxi005815; Thu, 14 Apr 2005 20:46:10 +0200 (CEST) Date: Thu, 14 Apr 2005 18:46:00 -0000 Message-Id: <200504141846.j3EIkAxi005815@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: cagney@gnu.org CC: gdb-patches@sources.redhat.com In-reply-to: <425EB411.6080109@gnu.org> (message from Andrew Cagney on Thu, 14 Apr 2005 14:18:57 -0400) Subject: Re: [Fwd: Re: RFA: DW_OP_piece read path] References: <425EB411.6080109@gnu.org> X-SW-Source: 2005-04/txt/msg00131.txt.bz2 Date: Thu, 14 Apr 2005 14:18:57 -0400 From: Andrew Cagney It appears I sent this to the wrong address, sigh. Ah, well, it's good to hear from you again. An sorry that I start nagging again, but can you please, please, please, add an empty line after the declaration of local variables in a block if said block is longer than say three or four lines? The following bit lifted from your patch provides no visual guidance at all about what's going on. This makes working on that code for me, and most likely others, very hard, even if I don't suffer from sleep deprivation. + int i; + long offset = 0; + bfd_byte *contents; + retval = allocate_value (SYMBOL_TYPE (var)); + contents = value_contents_raw (retval); + for (i = 0; i < ctx->num_pieces; i++) + { + struct dwarf_expr_piece *p = &ctx->pieces[i]; + if (p->in_reg) + { + bfd_byte regval[MAX_REGISTER_SIZE]; + int gdb_regnum = DWARF2_REG_TO_REGNUM (p->value); + get_frame_register (frame, gdb_regnum, regval); + memcpy (contents + offset, regval, p->size); + } + else /* In memory? */ + { + read_memory (p->value, contents + offset, p->size); + } + offset += p->size; + } Otherwise, thanks! It's good to have this functionality! Mark