> > 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 _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel