On Mon, 22 Aug 2011, Simon Hardy-Francis wrote:

> Julia Lawall <julia <at> diku.dk> writes:
> 
> > 
> > On Sun, 21 Aug 2011, SF Markus Elfring wrote:
> > 
> > > > Include files are mostly useful for giving type information.
> > > 
> > > I have got a different view on this matter.
> > 
> > Sorry, I didn't mean it as a general statement.  In the context of 
> > Coccinelle, include files are mostly useful for giving type information.
> 
> I guess then that Coccinelle just won't work on some C source code that 
> heavily
> employs and uses header files and the pre-processor.

It works.  You can give some hints about macro definitions.  Usually a 
very small number is enough.  Otherwise it uses some heuristics to find 
its way around, and ignores top-level items it can't parse.  On the other 
hand, if your code is written in a way that looks nothing like C, then it 
probably won't work.

> What I'm really looking for is a tool which gives me a lot of the debug 
> information (that usually gets generated by e.g. gcc and placed in the 
> executable for e.g. debugger usage; e.g. statement/token type, line 
> number, file, ...) but without having to compile the C file and extract 
> that debug info. I was hoping that there might be a way to get 
> Coccinelle to examine a particular C source code file and tell me all 
> about it... in a similar way that the debug info tells me a lot about 
> the C source file.

I think you would have to be more concrete.  Do you want to obtain this 
information in advance or at run time, eg when a crash occurs?  Could you 
give an example of the output you would like for a small program?

julia
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to