Sorry I am just a beginner. It should be a new GCC pass. I wish to add some additional debug information when binaries are build using GCC compilers. I very much like GCOV functionality - the runtime information it produces of code execution and statistics of same. So I wanted to add a maybe if possible a 'printf("%s %d", __FILE__ , __LINE__);' after each code line so that I can know where my code is going thru during execution. It would be a painstaking to do it manually as the codebase spreads across thousands of line. Is the same possible by writing a new GCC pass and if not please let me know any other debug information we can add by writing a new GCC pass? It would be a real great wroth for your help to provide some details. Regards, Prakash On Tue, Feb 14, 2012 at 12:08 PM, Jonathan Wakely <jwakely.gcc@xxxxxxxxx> wrote: > On 14 February 2012 19:40, Satya Prakash Prasad wrote: >> >> Our codebase compiles fine with this GCC version but not with GCC >> 4.5.0. It throws a lot of error which we need to fix is again an Org >> level initiative. >> >> However my intention was to implement this - >> https://lwn.net/Articles/457543/ - I wanted to write an a new GCC >> pass > > That's about writing a new pass *as*a*plugin* - do you need to write a > new pass or write a plugin? > >> which requires a minimum GCC 4.5.0 [as per the document]. Now > > *Plusings* require GCC 4.5, new passes don't. > > (But that's still not a reason to use GCC 4.5.0 instead of GCC 4.5.3!) > >> currently either our Org has to upgrade the code to compile with GCC >> 4.5.0 [which definitely is not possible now] or please let me know any >> alternative way to implement it in GCC pass in 4.1.2 version? > > Are you asking if it's possible to write a plugin for 4.1.2 (that's > impossible) or possible to write a new pass?