I have a tool which uses the output of dumpbin /symbols to do some dependency analysis with our C/C++ libraries. When we compiled the libs with VS 6.0, the dumpbin COFF SYMBOL TABLE contained entries like
000 00000008 DEBUG notype Filename | .file
x:\mydir\mysource.c
allowing me to get the relationship between sources and defined/used symbols, which is essential for my tool. When we compile with VS 2005, these entries are missing. When I look at the libs with a hex editor, it seems that there is no filename information at all included in the binary files, so it seems not to be a dumbin problem but is compilation related. So I'm looking for a way to get the Filename entries back into my libraries when compiling with VS 2005.
Thanks Scott.
The Debug Help API looks interesting, but I wasn't able yet to figure out how to get the same information I was able to extract from the COFF, ie. for each symbol
- the source file that defines it
- and the list of source files using the symbol
Any pointers on this?
VS 2005 doesn't emit COFF debugging information. Microsoft has deprecated it in favor of PDBs. That means they no longer produce it, and eventually link.exe will stop consuming it.
You can read PDB information using the debug help API.
http://msdn.microsoft.com/en-us/library/ms679309(VS.85).aspx