Debugging Tools for Windows

SymChk Command-Line Options

SymChk uses the following syntax:

symchk [/r] [/v | /q FileNames /s[OptsSymbolPath Options

symchk [/r] [/v | /q /ie ExeFile /s[OptsSymbolPath Options

symchk [/r] [/v | /q /id DumpFile /s[OptsSymbolPath Options

symchk [/r] [/v | /q /ih HotFixFile /s[OptsSymbolPath Options

symchk [/r] [/v | /q /ip ProcessID /s[OptsSymbolPath Options

symchk [/r] [/v | /q /it TextFileList /s[OptsSymbolPath Options

Parameters

/r
If Files specifies a directory, the /r option causes SymChk to recursively search all subdirectories under this directory for program files.
/v
Displays verbose information. This includes the file name of every program file whose symbols were investigated and whether it passed, failed, or was ignored.
/q
Enables quiet mode. All output will be suppressed (unless the /ot option is included).
FileNames
Specifies the program files whose symbols are to be checked. Absolute paths, relative paths, and UNC paths are permitted. An asterisk (*) wildcard is permitted. If FileNames ends in a slash, it is taken to be a directory name, and all files within that directory are checked. If FileNames contains spaces, it must be enclosed in quotation marks.
/ie ExeFile
Specifies the name of a program that is currently executing. The symbols for this program will be checked. ExeFile must include the name of the file and file extension (usually .exe), but no path information. If there are two different executables with the same name, this option is not recommended. ExeFile can specify any program, including a kernel-mode driver. If ExeFile is a single asterisk ( * ), SymChk will check the symbols for all running processes, including drivers.
/id DumpFile
Specifies a memory dump file. The symbols for this dump file will be checked.
/ih HotFixFile
Specifies a self-extracting Hotfix CAB file.
/ip ProcessID
Specifies the process ID of a program that is currently executing. The symbols for this program will be checked. ProcessID must be specified as a decimal number. There are two special wildcards supported:

/it TextFileList
Specifies a text file that contains a list of program files. The symbols for all these programs will be checked. TextFileList must specify exactly one file (by relative, absolute, or UNC path, but with no wildcards); if it contains spaces it should be enclosed in quotation marks. Within this file, each line indicates a program file (by relative, absolute, or UNC paths), and an asterisk wildcard (*) is permitted. However, any line using this wildcard must use a relative path. If a line in this file contains spaces, it should be enclosed in quotation marks. A semicolon within this file is a comment character — everything between a semicolon and the end of the line will be ignored.
/s[Opts] SymbolPath
Specifies the directories containing symbols. Absolute paths, relative paths, and UNC paths are permitted. Any number of directories can be specified — multiple directories should be separated with semicolons. If SymbolPath contains spaces, it must be enclosed in quotation marks. If you wish to specify a symbol server within this path, you should use one of the following syntaxes:

srv*DownstreamStore*\\Server\Share
srv*\\Server\Share

It is not recommended that you omit the /s[Opts] SymbolPath parameter, but if it is omitted, SymChk will point to the public symbol store by using the following default path:

srv*%SystemRoot%\symbols*http://msdl.microsoft.com/download/symbols

Any number of the following options can follow /s. There can be no space between the /s and these options:

e
SymChk will check each path individually instead of checking all paths at once.
u
Downstream stores will be updated. If the symbol path includes a downstream store, the symbol store will be searched for the symbol files. Only symbol stores that are being checked by SymChk will be updated.
p
Force checking for private symbols. Public symbols will be treated as not matching. The p option implies e and u, and cannot be used with s.
s
Force checking for public (split) symbols. Private symbols will be treated as not matching. The s option implies e and u, and cannot be used with p.

Options
The available options are divided into several classes. Each class of options controls a different set of features.

Output options. Any number of the following options can be specified. These options can be abbreviated by using /o only once — for example, /oi /oe can be written as /oie.

Option Effect
/oe Output will include individual errors. This option is only useful if /q is used, because individual errors are automatically displayed if quiet mode hasn't been activated.
/op Output will list each file that passes. (By default, SymChk only displays files that fail testing.)
/oi Output will list each file that was ignored. (By default, SymChk only displays files that fail testing.)
/od Output will include full details. Same as /oe /op /oi.
/ot Output will include result totals. This option is only useful if /q is used, because these totals are automatically displayed if quiet mode hasn't been activated.
/ob The full path for binaries will be included in all output messages.
/os The full path for symbols will be included in all output messages.
/oc Dir SymChk will create a traditional symbol tree in the directory Dir that contains a list of all the symbol files checked.

DBG file options. These options control how SymChk checks .dbg symbol files. Only one of the following options can be specified.

Option Effect
/ds SymChk will verify that .dbg information was stripped from the executable and only appears in the .dbg file, and that the executable points to the .dbg file. If the program was built without .dbg symbol files, this option has no effect. This is the default.
/de SymChk will verify that .dbg information was not stripped from the executable and that the executable does not point to a .dbg file. If the program was built without .dbg symbol files, this option has no effect.
/dn SymChk will verify that .dbg information is not present in the image, and that the image does not point to a .dbg file.

PDB file options. These options control how SymChk checks .pdb symbol files. Only one of the following options can be specified.

Option Effect
/pf SymChk performs no checking on the contents of the .pdb file — it just verifies that the files exist and match the binary. This is the default.
/ps SymChk will verify that the .pdb files have been stripped of source line, data type, and global information.
/pt SymChk will verify that the .pdb files contain data type information.

Filtering options. These options control how module filtering is performed when SymChk is checking processes or dump files. Only one of the following options can be specified.

Option Effect
/fm Module SymChk will only check dump files or processes associated with the specified module. Module must include the full filename, but must not include any part of the directory path.

Symbol checking options. Any number of the following options can be specified.

Option Effect
/cs SymChk won't verify that CodeView data is present. (By default, the presence of CodeView data is verified.)
/cc When SymChk is checking a hotfix CAB file, it will not look for symbols inside the cab. (By default, SymChk will look for symbols in the cab as well as in the provided symbol path.)
/ea File SymChk won't verify symbols for the programs listed in the specified file. This allows you to veto certain programs that would otherwise be verified. File must specify exactly one file (by relative, absolute, or UNC path, but without wildcards); if it contains spaces it should be enclosed in quotation marks. Within File, each line indicates a program file (by relative, absolute, or UNC paths); no wildcards are permitted. If a line in this file contains spaces it should be enclosed in quotation marks. A semicolon within this file is a comment character — everything between a semicolon and the end of the line will be ignored. If a symbol server is being used, symbols for these programs will not be copied to the downstream store.
/ee File Error messages for those programs listed in the specified file are suppressed. "Success" and "ignore" messages will appear as usual, and symbol files will be copied to the downstream store as usual. The format of File and the format of its contents are the same as that for /ea File.

Additional Information

For more information about SymChk, see Using SymChk.

Build machine: CAPEBUILD