From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24520 invoked by alias); 5 Dec 2013 21:07:14 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 24500 invoked by uid 89); 5 Dec 2013 21:07:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 05 Dec 2013 21:07:13 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rB5L74Pi008951 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 5 Dec 2013 16:07:05 -0500 Received: from barimba (ovpn-113-93.phx2.redhat.com [10.3.113.93]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id rB5JFoXZ006463 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 5 Dec 2013 14:15:51 -0500 From: Tom Tromey To: Doug Evans Cc: Doug Evans , gdb-patches@sourceware.org, binutils@sourceware.org Subject: Re: [PATCH] include/gdb/section-scripts.h: New file. References: <87eh5vwaa3.fsf@fleche.redhat.com> Date: Thu, 05 Dec 2013 21:07:00 -0000 In-Reply-To: (Doug Evans's message of "Mon, 2 Dec 2013 09:00:50 -0800") Message-ID: <87bo0vnm6x.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-12/txt/msg00211.txt.bz2 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