From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nick Roberts Newsgroups: gmane.emacs.devel Subject: Re: /lib/cpp not found in c-mode Date: Fri, 6 May 2005 09:54:41 +1200 Message-ID: <17018.38433.218342.918853@farnswood.snap.net.nz> 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> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1115330722 23947 80.91.229.2 (5 May 2005 22:05:22 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 5 May 2005 22:05:22 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 06 00:05:19 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DToSj-0002EK-Aa for ged-emacs-devel@m.gmane.org; Fri, 06 May 2005 00:04:54 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DToaK-00080y-5d for ged-emacs-devel@m.gmane.org; Thu, 05 May 2005 18:12:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DToR4-0004kZ-UI for emacs-devel@gnu.org; Thu, 05 May 2005 18:03:11 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DToQs-0004Wl-Pi for emacs-devel@gnu.org; Thu, 05 May 2005 18:02:59 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DToQp-0004Tr-HB for emacs-devel@gnu.org; Thu, 05 May 2005 18:02:55 -0400 Original-Received: from [199.232.41.67] (helo=mx20.gnu.org) by monty-python.gnu.org with esmtp (TLS-1.0:RSA_ARCFOUR_SHA:16) (Exim 4.34) id 1DToUJ-0006sq-Ic for emacs-devel@gnu.org; Thu, 05 May 2005 18:06:31 -0400 Original-Received: from [202.37.101.8] (helo=viper.snap.net.nz) by mx20.gnu.org with esmtp (Exim 4.34) id 1DToMX-0004UW-5P for emacs-devel@gnu.org; Thu, 05 May 2005 17:58:29 -0400 Original-Received: from farnswood.snap.net.nz (p170-tnt1.snap.net.nz [202.124.110.170]) by viper.snap.net.nz (Postfix) with ESMTP id 1728B4B6353; Fri, 6 May 2005 09:58:23 +1200 (NZST) Original-Received: by farnswood.snap.net.nz (Postfix, from userid 501) id 4E84E62A9B; Thu, 5 May 2005 22:54:42 +0100 (BST) Original-To: "Jan D." In-Reply-To: <0FA9201A-8390-4924-BDE3-2857B0A33576@swipnet.se> X-Mailer: VM 7.19 under Emacs 22.0.50.39 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:36732 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:36732 > > If gdb can expand macros using macro information from the executable > > (which requires knowledge of include paths and predefined macros), why > > can't cpp (or gcc -E) ? > > > > 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? Nick