Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Andrew Cagney <ac131313@ges.redhat.com>
Cc: David Carlton <carlton@math.stanford.edu>,
	gdb-patches@sources.redhat.com
Subject: Re: [RFA] convert blocks to dictionaries, phase 1, main part
Date: Tue, 17 Sep 2002 12:35:00 -0000	[thread overview]
Message-ID: <20020917193516.GB27789@nevyn.them.org> (raw)
In-Reply-To: <3D877FA4.8050607@ges.redhat.com>

On Tue, Sep 17, 2002 at 03:16:52PM -0400, Andrew Cagney wrote:
> 
> >>- macro's are bad m'kay :-)
> >
> >
> >Even accessor macros for members of structures?  Gee, I like those:
> >it's a lot easier to find all places where, say, struct block's
> >'hashtable' member is being used by grepping for 'BLOCK_HASHTABLE'
> >than by grepping for 'hashtable' and then sorting out which ones of
> >those really are referring to the 'hashtable' member as opposed to
> >some other use of the phrase.
> 
> Yep.  If you think accessor macro's are a good idea, try debugging / 
> using sim/common some time :-(
> 
> Also grep -e '->hashtable' works pretty well.

Not for anything with a generic name.  More than just blocks may have a
member named ->hashtable.  An accessor macro lets you do extra checking
where necessary and be much clearer about what interfaces are being
used.

We've argued about this before, and I still hold that your distrust of
simple accessor macros serves no purpose - ESPECIALLY after all of
Jim's work to improve macro debugging.  Which feels like it has a ways
to go, but is already tremendously useful to me.

> >So if you want me to get rid of all macros (other than, presumably,
> >symbolic constants, though I could use the enum trick there), I can
> >certainly do that.
> 
> Yes, please.  Symbolic constants as enum's is recommended.
> 
> >>- just implement interfaces sufficient for the immediate needs.  For
> >>  instance, instead of providing ``enum dict_type'', just describe
> >>  the idea.  Since we can compile with -Werror, changing internal
> >>  interface, when there is evidence that it is actually needed, has
> >>  become relativly easy.
> 
> >dict_type really is necessary currently: I need to provide hash tables
> >and linear environments to support the existing functionality of
> >blocks.  It's just like the 'hashtable' member of struct block.
> 
> Then just mention those that do apply.
> (I thought DanielJ indicated that you just doing an initial linear 
> implementation?)

No, I indicated that he was doing a linear and hashed implementation. 
I meant to, at least.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2002-09-17 19:35 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-16 15:26 David Carlton
2002-09-16 15:30 ` David Carlton
2002-09-17  7:35 ` Daniel Jacobowitz
2002-09-17  9:03   ` Andrew Cagney
2002-09-17 10:43   ` David Carlton
2002-09-17 10:49     ` Daniel Jacobowitz
2002-09-17 11:34       ` David Carlton
2002-09-17 12:24         ` Andrew Cagney
2002-09-17 11:44       ` Andrew Cagney
2002-09-17 12:30         ` Daniel Jacobowitz
2002-09-17 12:49           ` Andrew Cagney
2002-09-17 13:32             ` Daniel Jacobowitz
2002-09-17 21:48             ` Daniel Berlin
2002-09-18  7:26               ` Andrew Cagney
2002-09-20  9:13             ` Jim Blandy
2002-09-17 12:59         ` Daniel Berlin
2002-09-17 13:13           ` Andrew Cagney
2002-09-17  9:29 ` Andrew Cagney
2002-09-17 11:04   ` David Carlton
2002-09-17 12:16     ` Andrew Cagney
2002-09-17 12:35       ` Daniel Jacobowitz [this message]
2002-09-17 12:46       ` David Carlton
2002-09-17 12:57         ` Andrew Cagney
2002-09-22 14:51           ` Jim Blandy
2002-09-17 12:54       ` Michael Snyder
2002-09-17 12:59       ` Daniel Berlin
2002-09-18  2:56       ` Richard Earnshaw
2002-09-18 14:07         ` Andrew Cagney
2002-09-19  3:14           ` Richard Earnshaw
2002-09-19  6:18             ` Elena Zannoni
2002-09-19  7:52               ` Richard Earnshaw
2002-09-19  7:51             ` Andrew Cagney
2002-09-22 14:41       ` Jim Blandy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020917193516.GB27789@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=ac131313@ges.redhat.com \
    --cc=carlton@math.stanford.edu \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox