[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: /lib/cpp not found in c-mode

From: Jan D.
Subject: Re: /lib/cpp not found in c-mode
Date: Fri, 6 May 2005 06:51:38 +0200

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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]