Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Doug Evans <xdje42@gmail.com>
Cc: Doug Evans <dje@gmail.com>,
	gdb-patches@sourceware.org,        binutils@sourceware.org
Subject: Re: [PATCH] include/gdb/section-scripts.h: New file.
Date: Thu, 05 Dec 2013 21:07:00 -0000	[thread overview]
Message-ID: <87bo0vnm6x.fsf@fleche.redhat.com> (raw)
In-Reply-To: <CAP9bCMT2s-BMsyafMiZrNmhkAqTowmfjkHfJAQMEQpRQOhqzag@mail.gmail.com>	(Doug Evans's message of "Mon, 2 Dec 2013 09:00:50 -0800")

Tom> I don't see why this needs to go in include.

Doug> So you would have code that puts contents in this section using
Doug> magic numbers?  Eh? This doesn't make any sense.

I didn't say that.

Doug> Why does dwarf2.def exist (for example) ?

Because it has multiple in-tree users that ought to be kept in sync,
including some in gcc.

Doug> [The dwarf format is far more complicated, obvously.  But I didn't
Doug> know there was
Doug> a threshold of magic numbers was required before a header was allowed.]

I don't think there is, and I didn't say that either.

Doug> +/* Native GDB scripts are not currently supported in
Doug> .debug_gdb_scripts,
Doug> +   but we reserve a value for it.  */
Doug> +/*#define SECTION_SCRIPT_ID_GDB_FILE 2*/

Tom> There's no need either to reserve a value or to add commented out code.

Doug> I'm curious how I would apply this rule in general.

1. Don't check in commented-out code.

2. If a format is versioned or otherwise extensible, there is never a
   need to reserve space for a future change.  Instead just use the
   versioning or extension mechanism when the relevant change is made.
   In this case the appropriate time would be when actually changing gdb
   to read gdb scripts from the section.

Tom


  parent reply	other threads:[~2013-12-05 21:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-29 19:59 Doug Evans
2013-12-02 15:19 ` Tom Tromey
2013-12-02 17:01   ` Doug Evans
2013-12-03 16:17     ` Doug Evans
2013-12-05 21:07     ` Tom Tromey [this message]
2013-12-07 20:56       ` 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=87bo0vnm6x.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=binutils@sourceware.org \
    --cc=dje@gmail.com \
    --cc=gdb-patches@sourceware.org \
    --cc=xdje42@gmail.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