Philip Herron-2 wrote: > > On 24 November 2010 12:44, Sharanbr <sharanb@xxxxxxx> wrote: >> This might be a non standard usage, so please bear with me. >> >> I am in the process of writing a tool. The idea is that the user puts >> comments at certain points of his program. >> The comments have specific keywords. Once the code is compiled to >> generate >> assembly code, I would like to parse through the assembled code and then >> extract certain information based on the comments inserted in the code. >> The >> second part of the application is when the same process is followed to >> extract information from the linker output. For example, I would like to >> extract the physical address from which the current instruction is being >> executed. Can someone point me in the right direction if GCC has support >> to >> preserve the comments in the code as it assembles and links the code? > > Nothing shoots out at me if gcc supports this, but i would imagine > using some nice inline asm use, you could possibly achieve something > akin to what your trying to do. > > --Phil > > Thanks, Phil. I was thinking on the same lines after briefly going through the gcc manual. One more thing I thought might be useful is the debug info that gcc puts for tools like gdb. But I don't have enough knowledge on what exactly is the debug info available? If you are aware of it, please help me with some pointers ... -- View this message in context: http://old.nabble.com/preserving-comments-tp30296498p30303927.html Sent from the gcc - Help mailing list archive at Nabble.com.