From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4405 invoked by alias); 29 Sep 2011 13:57:10 -0000 Received: (qmail 4347 invoked by uid 22791); 29 Sep 2011 13:57:08 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 29 Sep 2011 13:56:52 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=EU1-MAIL.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1R9H6Z-0002Yh-7e from pedro_alves@mentor.com ; Thu, 29 Sep 2011 06:56:51 -0700 Received: from scottsdale.localnet ([172.16.63.104]) by EU1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 29 Sep 2011 14:56:49 +0100 From: Pedro Alves To: Matt Rice Subject: Re: Rename "info definitions"? Date: Thu, 29 Sep 2011 14:01:00 -0000 User-Agent: KMail/1.13.6 (Linux/2.6.38-11-generic; KDE/4.7.1; x86_64; ; ) Cc: gdb-patches@sourceware.org, Doug Evans References: <20110921190419.542512461A9@ruffy.mtv.corp.google.com> <201109291428.16541.pedro@codesourcery.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201109291456.47303.pedro@codesourcery.com> X-IsSubscribed: yes 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 X-SW-Source: 2011-09/txt/msg00537.txt.bz2 On Thursday 29 September 2011 14:42:42, Matt Rice wrote: > On Thu, Sep 29, 2011 at 6:28 AM, Pedro Alves wrote: > > On Thursday 29 September 2011 14:26:19, Pedro Alves wrote: > >> We could just add it back if we ever find a need though. > >> If a language needing it for macros would require adding more > >> such switches to other commands. > > > > Err, I meant, "I suspect a language needing it for macros would > > require adding more such switches to other commands." > > None of the other macro commands accept options, they just interpret > the entire string as a > name currently, so this is a new form of c-ism > > I think all that would be required is just turning the macro printing > formatters into language based callbacks, and the macro expansion > parser into language based callbacks. Still, I'm really not sure doing just that would be a good idea. You can always run a C preprocessor on some non-C sources. If it's a compiled language, the compiler should be able to output c preprocessor macro debug info in that case too. I think that "info macros" and friends (possibly renamed to c-macros?) should would still operate on the C preprocessor macros / text expansion level in that case, instead of on whatever the target language calls macros, and a new command specific for the language's macros would be added. > but who knows what you would run into if you actually tried. Exactly. :-) -- Pedro Alves