From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12544 invoked by alias); 29 Jun 2010 23:15:59 -0000 Received: (qmail 12535 invoked by uid 22791); 29 Jun 2010 23:15:59 -0000 X-SWARE-Spam-Status: No, hits=-5.1 required=5.0 tests=AWL,BAYES_00,FAKE_REPLY_C,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 29 Jun 2010 23:15:55 +0000 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o5TNFgXj010614 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 29 Jun 2010 19:15:42 -0400 Received: from host0.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o5TNFcYS023256 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 29 Jun 2010 19:15:41 -0400 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id o5TNFcLp015147; Wed, 30 Jun 2010 01:15:38 +0200 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id o5TNFaAJ015146; Wed, 30 Jun 2010 01:15:36 +0200 Date: Tue, 29 Jun 2010 23:15:00 -0000 From: Jan Kratochvil To: Tom Tromey , Joel Brobecker Cc: gdb@sourceware.org Subject: Re: gdbtypes.h #defined field accessors Message-ID: <20100629231536.GA14920@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100628205701.GC2700@adacore.com> User-Agent: Mutt/1.5.20 (2009-12-10) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2010-06/txt/msg00144.txt.bz2 On Mon, 28 Jun 2010 22:37:47 +0200, Tom Tromey wrote: > Though FWIW, little of the GDB work I've done seems amenable to automation, > even the grungy add-an-argument-to-val_print stuff :-( I have to agree... > I tend to stick with the style of a given module. > > In new code I don't generally write accessors. OK. On Mon, 28 Jun 2010 22:57:01 +0200, Joel Brobecker wrote: > > In new code I don't generally write accessors. > > I don't know if this is relevant to this particular discussion, but > I tend to like opaque structures and accessors (setter/getter) functions, > and I try to use that when writing new code. While it is not relevant to your "new code" note this is what I miss on the GDB accessors - they would be (more) useful separated into getters/setters. It would easily enable providing various currently constant fields as dynamic DWARF blocks. Thanks, Jan