From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13278 invoked by alias); 1 Nov 2006 19:32:21 -0000 Received: (qmail 13269 invoked by uid 22791); 1 Nov 2006 19:32:20 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 01 Nov 2006 19:32:16 +0000 Received: (qmail 20198 invoked from network); 1 Nov 2006 19:32:14 -0000 Received: from unknown (HELO localhost) (jimb@127.0.0.2) by mail.codesourcery.com with ESMTPA; 1 Nov 2006 19:32:14 -0000 To: David Taylor Cc: gdb-patches@sourceware.org, Eli Zaretskii Subject: Re: stabs.texinfo update for macro define/undefine References: <200610251931.k9PJVRDO011265@mailhub.lss.emc.com> <200610302225.k9UMPLZ9001050@mailhub.lss.emc.com> <200611010305.kA135iYx019864@mailhub.lss.emc.com> From: Jim Blandy Date: Wed, 01 Nov 2006 19:32:00 -0000 In-Reply-To: <200611010305.kA135iYx019864@mailhub.lss.emc.com> (David Taylor's message of "Tue, 31 Oct 2006 22:05:44 -0500") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-11/txt/msg00007.txt.bz2 David Taylor writes: >> From: Jim Blandy >> Date: Tue, 31 Oct 2006 15:23:29 -0800 >> >> It's clear from the example, but it would be nice if the text >> explicitly explained how function-like macro arguments appear in the >> N_MAC_DEFINE stabs. It also should explain how the following are >> distinguished: >> >> #define foo x >> #define foo() x >> >> With the latter #definition, 'foo' followed by something other than an >> opening parenthesis isn't replaced. > > The former shows up as "foo x", the latter as "foo() x". > > Yes, the example could be enhanced to illustrate that. And a little > more about the ``transformation'' from what is found in the *.c file > to the stabs entry. > > But, as to the latter -- am I misunderstanding you? Are you asking > for text about when something is replaced versus when it isn't > replaced? If yes, that is *WAY* beyond the scope of the file. The > file deals exclusively with *STABS*. When something is replaced vs > not replaced is a CPP issue. It has nothing to do with STABS. No, of course not --- we both agree that your text only needs to describe how to convey all the possible sorts of preprocessor macro definitions accurately from the compiler to the debugger in STABS. I just had two points: - I think the text ought to actually state all the rules needed to do the job correctly, and not leave details to examples. - There are some cases your examples didn't cover. (Of course, what's a separate case and what's just a specialization of a more general thing is sort of a matter of taste. But it was something I remember running into when I did the existing DWARF macro code, so I thought I'd mention it.)