The SplitSymbols function strips symbols from the specified image.
BOOL SplitSymbols(
IN LPSTR ImageName,
IN LPSTR SymbolsPath,
OUT LPSTR SymbolFilePath,
IN DWORD Flags
);
Value | Meaning |
---|---|
SPLITSYM_EXTRACT_ALL | Usually, an image with the symbols split off will still contain a MISC debug directory with the name of the symbol file. Therefore, the debugger can still find the symbols. Using this flag removes this link. The end result is similar to using the -debug:none switch on the Microsoft linker. |
SPLITSYM_REMOVE_PRIVATE | This strips off the private CodeView symbolic information when generating the symbol file. It does this by making a call to the RemovePrivateCvSymbolic function. |
If the function succeeds, the return value is TRUE.
If the function fails, the return value is FALSE. To retrieve extended error information, call GetLastError.
The SplitSymbols function should be used when stripping symbols from an image. It will create a symbol file that all Win32-compatible debuggers understand. The format is defined in WINNT.H and consists of an image header (IMAGE_SEPARATE_DEBUG_HEADER), followed by the array of section headers, the exception information (on RISC only) or FPO information (on X86 only), and all debug symbolic information from the image.
If the SymbolsPath parameter is NULL, the symbol file is stored in the directory where the image exists. Otherwise, it is stored in the subdirectory below SymbolsPath that matches the extension of the image. Using this method reduces the chances of symbol file collision. For example, the symbols for myapp.exe will be in the SymbolsPath\exe directory and the symbols for myapp.dll will be in the SymbolsPath\dll directory.
Windows NT: Requires version 4.0 or later.
Windows: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Windows CE: Unsupported.
Header: Declared in imagehlp.h.
Import Library: Use imagehlp.lib.
PE Image Helper (ImageHlp) Overview, ImageHlp Image Modification Functions, RemovePrivateCvSymbolic