Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Doug Evans <dje@google.com>
Cc: gdb-patches@sourceware.org, ccoutant@google.com
Subject: Re: [RFA] comdat types
Date: Thu, 25 Jun 2009 20:49:00 -0000	[thread overview]
Message-ID: <m3fxdof39i.fsf@fleche.redhat.com> (raw)
In-Reply-To: <e394668d0906251328v4559d3c9g48698aac014188fc@mail.gmail.com> (Doug Evans's message of "Thu\, 25 Jun 2009 13\:28\:02 -0700")

>>>>> "Doug" == Doug Evans <dje@google.com> writes:

Tom> Too bad we don't have allocation pools instead of obstacks.  I suppose
Tom> in this specific case we could use the objfile data machinery to
Tom> deallocate hash tables.

Doug> If that's ok, I'll do that.

Sorry, I wasn't clear.  This particular thing was just a drive-by
complaint on my part.  I don't think you need to make any change to
your patch.

Tom> Over-bracing.  There's a fair amount of this in the patch.

Doug> One of the style rules I'm less fond of (and see others are too from
Doug> scans of gdb, is this a rule or a guideline?).
Doug> [I'm reminded of Pirates of the Caribbean, "They're more like
Doug> guidelines anyway." :-)]
Doug> But ok.

Yeah, I tend to treat this one as a rule.

Doug> Well, that one was an oversight (these patches drag on and my eyes
Doug> tend to glaze over ...).
Doug> While as a general rule I don't disagree, it's kinda odd to see others
Doug> add new functionality with open issues.

I'm sorry.  I try to be reasonably consistent when reviewing, but I'm
probably not.  It is fair to call me on that when it happens.

Perhaps it was wrong of me to drag in the general rule (which, as we
were discussing on irc, has various corner cases and ambiguities) when
something specific would serve better.

The comments in question:

+  if (this_cu->from_debug_types)
+    {
+      /* ??? How come this is for .debug_types only?  */
+      this_cu->offset = cu.header.offset;
+      this_cu->length = cu.header.length + cu.header.initial_length_size;
+    }

   /* Possibly set the default values of LOWPC and HIGHPC from
-     `DW_AT_ranges'.  */
+     `DW_AT_ranges'.
+     ??? Is this valid for .debug_types?  */
   if (cu.has_ranges_offset)
     {

+  if (this_cu->from_debug_types)
+    {
+      /* ??? It's not clear we want to do anything with stmt lists here.
+	 Waiting to see what gcc ultimately does.  */
+    }


It seems to me that the first one is (IIUC) a question about the
implementation of dwarf2read.c itself.  So, can it answered and
rephrased as a note?

The second seems like a question about the spec.

The third one, I'm less sure.  Perhaps just removing the "???" part is
appropriate.

Doug> fwiw I like StudlyCaps for labels:  How many labels should there be in
Doug> one's code?
Doug> --> As absolutely few as possible.
Doug> Same with StudlyCaps. :-)

:-)

StudlyCaps just look weird to me in GNU code.  And the many gotos in
gdb largely follow the GNUish naming convention, though I see some
counterexamples in Ada:

ada-typeprint.c:	goto Huh;
ada-exp.y:      goto BadEncoding;
ada-exp.y:              goto TryAfterRenaming;

Tom


  reply	other threads:[~2009-06-25 20:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-20  0:04 Doug Evans
2009-06-25 19:47 ` Tom Tromey
2009-06-25 20:28   ` Doug Evans
2009-06-25 20:49     ` Tom Tromey [this message]
2009-07-15  1:13       ` Doug Evans
2009-07-15 19:28         ` Tom Tromey
2009-07-16  1:25           ` Doug Evans
2009-07-21  0:10           ` Cary Coutant
2009-06-26  1:33     ` Daniel Jacobowitz
2009-06-26  0:01   ` Cary Coutant
2009-06-26  0:54     ` Doug Evans

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=m3fxdof39i.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=ccoutant@google.com \
    --cc=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    /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