Get debug symbol files using Microsoft Symbol Server

xiaoxiao2021-03-14  183

Note: To view this video, you must have Windows Media Player 7.0 or higher in your computer. For additional information, click the article number below to see the article in the Microsoft Knowledge Base:

299321

(http://support.microsoft.com/kb/299321/) Description and availability of Windows Media Player 7.1

When you use a variety of Microsoft tools to debug applications, you must have symbolic information. The symbol file provides a footprint that is included in the executable and dynamic link library (DLL). In addition, the symbol file can also represent a function calling roadmap that meets the failure point. For example, when you dump the call stack within the debugger, you must have a symbol. This article discusses how to use Microsoft Symbol Server by specifying the following URLs of various commissioning tools:

http://msdl.microsoft.com/download/symbols

note:

http://msdl.microsoft.com/download/symbols is not brutal and is only available for access by the debugger.

Back to the top

More information

Using the Symbol Server Technology Microsoft Symbol Server is built using SymsRV technology (Symsrv.dll) with the Debugging Tools for Windows package. SYMSRV generates a local symbolic cache for fast and automatic symbol parsing.

Using Symbol Server just as simple as using the corresponding syntax in a symbol path. Usually, the format of the syntax is as follows:

SRV *

Your local symbol folder * http://msdl.microsoft.com/download/symbols

among them

Your Local Symbol Folder is any drive or sharing that is used as a symbol target.

For example, to set a symbol path in a WindBG debugger, type the following command in the command window of the debugger:

. Sympath SRV * f: / localsymbols * http://msdl.microsoft.com/download/symbols

To get the latest SYMSRV feature, you must install the latest debug packages. To get the latest version of the Debugging Tools for Windows package, please visit the following Microsoft website:

Microsoft debugging tool

http://www.microsoft.com/whdc/devtools/ddk/default.mspx

(http://www.microsoft.com/whdc/devtools/ddk/default.mspx)

For more information on Symbol Server technology, see the debuggers.chm help file provided with the Debugging Tools for Windows package.

Back to the top

Setting_nt_symbol_path Environment Variable If you provide the correctness in the _nt_symbol_path environment variable

Symsrv syntax, common Microsoft debugging tools use SYMSRV technology. These tools will automatically include anything you provide as a symbol path in this variable.

You can set this variable to a system variable or a user environment variable. To do this from the desktop, right-click

My computer, then click

Attributes. in

On the Advanced tab, click

Environment variable.

You can also set this variable at the command prompt. If this method is used, all applications that will be started through the command prompt will inherit this setting. E.g:

SET _NT_SYMBOL_PATH = SYMSRV * SYMSRV.DLL * F: / LOCALSYMBOLS * http://msdl.microsoft.com/download/symbols Back to the top

Use Microsoft Symbol Server and Windbg to use the Symbol Server website in Windbg, follow these steps:

1. Start the Windows Debugger (Windbg.exe). 2. On the File menu, click the symbol file path. 3. In the Symbol Path box, type the following command:

SRV * Your Local Folder for Symbols * http://msdl.microsoft.com/download/symbols

Where your Local Folder for Symbol is a folder in which local symbol cached. The debug symbol will be downloaded to this location. Note: You can point to any local path or shared location that your computer can reach; this location is not necessarily the location on your computer's hard drive. In addition, you can also use it at the command prompt.

The .sympath command sets the symbol path.

You can

Symsrv syntax and other symbol paths together. For example, use the following syntax to specify two or more symbol paths:

f: / busobjsymbols; srv * f: / localsymbols * http://msdl.microsoft.com/download/symbols

This syntax is separated by a semicolon.

When you start commissioning a fault dump file or an application, the Windows Debugger checks if the symbol information of the module it load is located in the local folder. If the module's symbol information is not in the local folder, Windbg will try to download the corresponding symbol file or file from Symbol Server.

If you use the same local cache when you debug an application on a computer with different file versions, you will download different versions of symbols and store them together with the first batch of symbols. The SymStore format stores files in accordance with the timestamps and size (or checksum) of the image. Therefore, symbols from different product versions can be coexisted in parallel. (SymStore.exe is a utility that generates a symbol server in the Debugging Tools for Windows package. For more information, see the product documentation.)

Since the download symbol file requires some time, I remember that when you debug the application, the debugger may appear to stop the response (hang). This is because most symbol files (such as NTDLL.DLL, KERNEL32.DLL, and other files) must be downloaded.

Back to the top

Using the Symchk.exe Utility Download Sigs You can use the Symchk.exe utility to generate local symbolic caches in a manner, and non-invasive way. Symchk.exe utility is provided with the Debugging Tools for Windows package. Symchk.exe is a command line tool. You may need to add the folder of the Debugging Tools for Windows package to the PATH environment variable on the system to access the tool from any command prompt.

To download the symbol file of all components in the Windows / System32 folder using the Symchk.exe utility, use the following command line command:

Symchk / R C: / Windows / System32 / S SRV * C: / Symbols / * http://msdl.microsoft.com/download/symbols

In this example:

• "/ r C: / Windows / System3" looks for all symbol files in all subfolders. • "/ s srv * c: * http://msdl.microsoft.com/download/symbols" Specifies the symbol path for symbol resolution. In this example, "C: / Symbols" is a local folder where the symbol is replicated from the symbol server. To get more information for the Symchk.exe command line option, type SYMCHK / ?. Other options include specifying the names or process ID (PID) of the running executable.

转载请注明原文地址:https://www.9cbs.com/read-129223.html

New Post(0)