Fix the printing of the macro stack: we need to follow the
mstk->next_active list, not mstk->next, and we need to reverse the
order so that the highest-level inclusion comes first.
Since this should be a rare or at least performance-insensitive
operation, do it using simple function recursion.
Finally, add an ellipsis before the "from macro" message; it greatly
enhances readability.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
It can be hard to find errors inside potentially nested macros.
Show the mmacro expansion stack when printing diagnostics.
Note that a list file doesn't help for errors that are detected
before the code-generation pass.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>