Search code examples
c++winapiwindbgpdb-files

Finding symbols for C++ source file


I have a project that is C++ WIN32 project. I found a problem that some symbol can be recognized by the windbg but some don't. I don't know why. The characteristics are:

1) both are C++ method

2) both function are in one .cpp file

3) the two functions are very close in the source file and neither of them are enclosed by a #ifdef

4) I have used dbh.exe to check the symbol, the symbol missing in the windbg is also not in the pdb file.

I am guessing if the symbol missing may due to the inheritance of the class? Please suggest, thanks! Bin


Solution

  • If you don't use a function, as long as it is not a virtual function, it may be deadstripped by the linker. Unused global data objects may be deadstripped as well.