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?