On Tue, Apr 24, 2012 at 2:54 AM, Konrad Eisele <konrad@xxxxxxxxxxx> wrote: > Hi, I'd like to extend sparse so that I can preserve a > dependency tree that goes from c parse entities all > the way down to single tokens. There are several places > this can be useful: Sorry for the delay. I take a some time to think about this problem. May I ask some high level questions? I am trying to understand why this this token level dependency is useful. One alternative is that, you do a per-processor stage on the source file. Then you have one big post processed source. The current sparse can run on that processed source file and get all the symbol dependency. Because each symbol has "pos" and "endpos" member. You only need to recursively walk the ctype of the symbols you can get the shrink version of the source code. The draw back with that is, all the macro has been expended, you will not able to see the macro names etc. Also, if you change the source file, the shrinking process has to be redone because it might use new macros. So the shrinking + compiling is not necessary a saving compare to directly compiling without the shrinking. I figure you might have a slightly different usage module in mind to justify the shrinking. Please help me understand how you intend to use it. I think if the source file doesn't need pre-processing. Sparse can do symbol dependency already. What you really want is actually being able to back trace in the pre-processing stage, what macro has been expand and what is the original form on the expanded value. Chris -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html