Symbol Table
-
hi, I'm doing a project which requires extraction of all the methods and members of a class in CPP files and such similar other informations. One big hurdle is these methods might use values/variables from other modules/classes. so I'm in need of creation of a complete symbol table which is becoming very tough tat can span to those other modules too. can anybody suggest an open source project which has these functionalities, and as well creation of the symbol table wherein I can use these symbols. I tried with lex/yacc but then the scope of an extraction remains only within a file, else I need to write my own routines to extract the cross module dependency information, which ofcourse due to paucity of time is becoming a foolish decision. Hope you get my objective. Please help.
There are only two kinds of people who are really fascinating-people who know absolutely everything, and people who know absolutely nothing. Oscar Wilde (1854-1900) Regards... Shouvik
-
hi, I'm doing a project which requires extraction of all the methods and members of a class in CPP files and such similar other informations. One big hurdle is these methods might use values/variables from other modules/classes. so I'm in need of creation of a complete symbol table which is becoming very tough tat can span to those other modules too. can anybody suggest an open source project which has these functionalities, and as well creation of the symbol table wherein I can use these symbols. I tried with lex/yacc but then the scope of an extraction remains only within a file, else I need to write my own routines to extract the cross module dependency information, which ofcourse due to paucity of time is becoming a foolish decision. Hope you get my objective. Please help.
There are only two kinds of people who are really fascinating-people who know absolutely everything, and people who know absolutely nothing. Oscar Wilde (1854-1900) Regards... Shouvik
You could try doxygen which can be downloaded from www.sourceforge.net[^] and will have it's own homepage elsewhere as well If you want a simple-ish parser than can handle most C++ stuff. Alternatively you could just compile the code with Visual Studio, with all the debugging info switched on, and then use Microsoft's own symbol engine in dbghelp.dll to interrogate the .pdb (Program databse) file of the project. WinDbg which is widely available does this. I recommend John Robbins' book Debugging Windows Applications for all the details on debug symbol information, how to get it and use it.
Nothing is exactly what it seems but everything with seems can be unpicked.
-
You could try doxygen which can be downloaded from www.sourceforge.net[^] and will have it's own homepage elsewhere as well If you want a simple-ish parser than can handle most C++ stuff. Alternatively you could just compile the code with Visual Studio, with all the debugging info switched on, and then use Microsoft's own symbol engine in dbghelp.dll to interrogate the .pdb (Program databse) file of the project. WinDbg which is widely available does this. I recommend John Robbins' book Debugging Windows Applications for all the details on debug symbol information, how to get it and use it.
Nothing is exactly what it seems but everything with seems can be unpicked.
hi Thanks for the informative reply. Actually to make things more clear I'd like to say that we are testing a software that has it's build not only in Visual Studio but many other compilers as well(viz. GCC) hence there would be lot of dependcies and as well incompatibilities with other compilers. It is therefore a need to write our own testing software and that has to have a capability of mainatining a Symbol Table. So the way of proceeding suggested by you is not able to provide me the solution to the problem I'm facing now. All my objective is to gather and maintain all the methods and variables pertaining to a class / even global that span accross the whole build. Will any exisitn project be able to do this?? please help. Once again thanks a lot for the reply.
There are only two kinds of people who are really fascinating-people who know absolutely everything, and people who know absolutely nothing. Oscar Wilde (1854-1900) Regards... Shouvik
-
hi Thanks for the informative reply. Actually to make things more clear I'd like to say that we are testing a software that has it's build not only in Visual Studio but many other compilers as well(viz. GCC) hence there would be lot of dependcies and as well incompatibilities with other compilers. It is therefore a need to write our own testing software and that has to have a capability of mainatining a Symbol Table. So the way of proceeding suggested by you is not able to provide me the solution to the problem I'm facing now. All my objective is to gather and maintain all the methods and variables pertaining to a class / even global that span accross the whole build. Will any exisitn project be able to do this?? please help. Once again thanks a lot for the reply.
There are only two kinds of people who are really fascinating-people who know absolutely everything, and people who know absolutely nothing. Oscar Wilde (1854-1900) Regards... Shouvik
In that case ripping the parser from doxygen (which I think is pretty cross platform) might be the best way to go but it will be a lot of work. Remeber if you're using GCC it compiles on Win32 as well and you get the source with it which contains a full parser to generate the symbols. You also get GDB the GNU Debugger with it which may give the necessary clues to be able to read and interpret GCCs symbols. Either way it's going to be a BIG project. Good luck with it :)
Nothing is exactly what it seems but everything with seems can be unpicked.