From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: /lib/cpp not found in c-mode Date: Fri, 6 May 2005 06:51:38 +0200 Message-ID: <966E6F20-E10E-43E5-8E4F-A9C1043E6D47@swipnet.se> References: <17013.26868.207510.370151@farnswood.snap.net.nz> <17013.52411.51878.781739@farnswood.snap.net.nz> <17014.39042.74353.677362@farnswood.snap.net.nz> <01c55014$Blat.v2.4$59df46a0@zahav.net.il> <01c550ec$Blat.v2.4$3b8fa220@zahav.net.il> <17017.64613.316775.721866@farnswood.snap.net.nz> <0FA9201A-8390-4924-BDE3-2857B0A33576@swipnet.se> <17018.38433.218342.918853@farnswood.snap.net.nz> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v728) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1115355784 23737 80.91.229.2 (6 May 2005 05:03:04 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 6 May 2005 05:03:04 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 06 07:03:01 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DTuzM-0006vE-Ro for ged-emacs-devel@m.gmane.org; Fri, 06 May 2005 07:03:01 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DTv6x-0002u0-2r for ged-emacs-devel@m.gmane.org; Fri, 06 May 2005 01:10:51 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DTuqZ-0007Du-5R for emacs-devel@gnu.org; Fri, 06 May 2005 00:53:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DTuqT-00079E-AL for emacs-devel@gnu.org; Fri, 06 May 2005 00:53:49 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DTuqR-000725-FN for emacs-devel@gnu.org; Fri, 06 May 2005 00:53:47 -0400 Original-Received: from [195.54.107.73] (helo=mxfep02.bredband.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DTuuW-0007uH-Gb for emacs-devel@gnu.org; Fri, 06 May 2005 00:58:00 -0400 Original-Received: from coolsville.localdomain ([83.226.180.210] [83.226.180.210]) by mxfep02.bredband.com with ESMTP id <20050506045234.WLSM9918.mxfep02.bredband.com@coolsville.localdomain>; Fri, 6 May 2005 06:52:34 +0200 In-Reply-To: <17018.38433.218342.918853@farnswood.snap.net.nz> Original-To: Nick Roberts X-Mailer: Apple Mail (2.728) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:36746 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36746 >> The information you see in gdb is all from the debug info in the >> executable, so it does not require knowledge of include paths and >> predefined macros. The compilation of the executable does, but after >> that it is all in the debug info, so gdb does not care what the >> include paths where at the time of compilation. >> >> Jan D. >> > > Sorry, yes you're right it doesn't care what the include paths > where. But my > point is that it can expand all the macros while "gcc -E" can't. > "gcc -E" is > typically given the source file as input but if it was also given the > executable, it presumably could be adapted so that it could expand > all the > macros just like GDB can. > > Would that not be a worthwhile thing to do? If the executable exists already, why am I typing in the source code in Emacs? :-) gcc -E can expand the macros just fine, it just needs the same input (-I -D and -U) as gcc got when creating the executable. As others pointed out, it is impractical to set this up if you are working on several different projects at once. Personally I don't see the need for expanding macros. One of the reasons I use them in the first place is to hide details I don't need to see. Expanding them while editing seems a strange thing to do. Jan D.