INFO: Symbol Types of a Module

ID: Q217070


The information in this article applies to:


SUMMARY

This article explains how the IMAGEHLP library analyzes symbolic information depending on the type of symbols that are generated for any executable file or dynamic link library (DLL). The symbol type may be particularly useful for an application which needs symbolic information.


MORE INFORMATION

Following are two important components involved in using IMAGEHLP.

  1. The Imagehlp.dll comes with the Windows NT operating system. This DLL is also a re-dispatchable component on Windows 95/98. For the redistribution policy, please refer to the Platform SDK license information.


  2. Mspdbxx.dll or Msdbi.dll are non-redistributable components. Mspdbxx.dll is shipped with the Microsoft Visual C++ tools and Msdbi.dll comes with the Windbg debugger component.



If a module is built to generate CodeView debug information in a .pdb file, Imagehlp.dll will need either Mspdbxx.dll (XX corresponds to the version of Microsoft Visual C++ 32-bit Edition used to generate the debug information, usually this is version 4.1, 4.2, or 5.0.) or Msdbi.dll (Microsoft Visual C++ 6.0) depending on the .pdb file format for all symbol handling functions.

If you are using the Microsoft Visual C++ development environment, select the following linker settings in the Link tab under Project Settings:
If the CodeView debug information is in a .pdb file, IMAGEHLP will dynamically load either one of the available Mspdbxx.dlls or Msdbi.dll to analyze the debug format.

If the debug information is embedded inside an executable file, a DLL, or is stripped and placed in a .dbg file, the Imagehlp.dll is sufficient for using all symbol handler functions. The symbol type information can be obtained by using the SymGetModuleInfo() IMAGEHLP function where SymType is the corresponding member in the IMAGEHLP_MODULE structure. If SymType is set to SymPdb, IMAGEHLP will dynamically load one of the available Mspdbxx.dlls or Msdbi.dll that can analyze the debug format. The symbol type is SymPdb if the CodeView symbols are placed in a .pdb file. If the CodeView symbols are embedded inside an executable file, a DLL, or stripped and placed in a .dbg file, the symbol type will be SymCv. If the symbol type is SymCv, SymCoff, SymSym, or anything other than SymPdb, then Imagehlp.dll uses all symbol handler functions.


REFERENCES

Q121366: INFO: PDB and DBG Files - What They Are and How They Work
For more information on IMAGEHLP_MODULE structure, please refer to the SDK documentation.

Additional query words:


Keywords          : kbAPI kbDebug kbKernBase 
Version           : winnt:4.0
Platform          : winnt 
Issue type        : kbinfo 

Last Reviewed: April 30, 1999