How to Set Up Windows NT Debug Symbols
Windows NT Debug Symbols must be set up if a computer needs to be remotelyor locally debugged. This article provides instructions on how toset up Windows NT Debug Symbols.
- What Are Symbols
- Setting Up a Custom Symbol Tree
- Single Processor vs. Multiprocessor
- Custom HAL.DLL
- After the Symbol Tree Is Created
What Are SymbolsDebug Symbol files (symbols) are required to do both kernel and user-modedebugging in Windows NT. Symbols provide a way to resolve global variablesand function names in the loaded executable file.
Symbols are produced by the linker when a program is built. They arestripped out of the retail product and saved in a separate (.DBG) file.This considerably reduces file size which decreases file load time and thusincreases system performance. Symbols represent Function\API names andglobal variables.
The .DBG file contains symbolic information for each file. They can befound on the SUPPORT\DEBUG\<platform>\SYMBOLS directory of the Windows NTinstallation compact disc.
Patched builds such as Service Packs require a special set of symbols, thatis a combination of the base build and the patched symbols.
The SYMBOLS directory is divided up into seven subdirectories, calledExtension Subdirectories (note that many of the symbol files in thesedirectories match USER MODE components of Windows NT):
COM - symbols for all files ending in .COM go here CPL - symbols for all files ending in .CPL go here. DLL - symbols for all files ending in .DLL go here DRV - symbols for all files ending in .DRV go here EXE - symbols for all files ending in .EXE go here SCR - symbols for all files ending in .SCR go here SYS - symbols for all files ending in .SYS go here.
The symbols must match their respective files. Symbols from a differentbuild give erroneous information. All of the symbol file link dates mustmatch those on the computer being debugged.
Setting Up a Custom Symbol TreesThe Symbol Tree is the subdirectory tree on the host computer whichcontains the symbol files which match the remote computer being debugged.
- Create a Subdirectory on the host computer. For example:MKDIR C:\SYMBOLS
- Always start with the base Windows NT version number. Copy the following files from the installation compact disc for the appropriate version:XCOPY [CD Drive]:\SUPPORT\DEBUG\I386 C:\SYMBOLS /S.
- Copy the symbols for the appropriate Service Pack into the custom tree. Service Pack symbols can be found on FTP.MICROSOFT.COM.
For example, the symbols for Windows NT 3.51 Service Pack 4 can be downloaded from the following location:\bussys\winnt\winnt-public\fixes\usa\NT351\ussp4\symbolsDownload the file called SYM_351<X>.EXE where X represents the platform (I for x86, A for Alpha, P for PPC).
Decompress the files into the symbol tree. For example:SYM_351<X>.EXE -d C:\SYMBOLS
- Copy any third-party patches, such as the Compaq SSD symbols, to the custom symbol tree. These symbols must be obtained from the third-party vendor.
- If Microsoft has supplied unique fixes for your installation, copy the DBG file supplied with the fix into the appropriate subdirectory (for example: SYS, EXE, DLL).
- If the computer is a single processor Intel system, the symbol tree is complete. Please see the "After the Symbol Tree is Created" section below.
Single Processor vs. MultiprocessorWindows NT uses a special kernel for SMP systems. During installation thiskernel is renamed. It is important that the DBF file is renamed fordebugging.
NTOSKRNL.EXE NTOSKRNL.DBG = Single processor NTKRNLMP.EXE NTKRNLMP.DBG = Multiple processors
If the system is a Multi-Processor, do the following:
- Change the directory to the DLL component directory. For example:CHDIR C:\SYMBOLS\DLL
- Rename the uniprocessor kernel to another filename. For example:RENAME NTOSKRNL.DBG NTOSKRNL.UNI
- Copy the multiprocessor kernel over the uniprocessor kernel. For example:COPY NTKRNLMP.DBG NTOSKRNL.DBG
Custom HAL.DLLSome hardware platforms require a special Hardware Abstraction Layer (HAL)Driver. Like the Kernel file, the custom HAL is renamed during theinstallation process. Here is a list of common HALs:
HAL files for I386 Computers:
Filename Description---------------------------------------------------HAL.DLL Standard HAL for Intel systemsHAL486C.DLL HAL for 486 c step processorHALAPIC.DLL Uniprocessor version of HALMPS.DLLHALAST.DLL HAL for AST SMP systemsHALCBUS.DLL HAL for Cbus systemsHALMCA.DLL HAL for MCA-based systems (PS\2 and others)HALMPS.DLL HAL for most Intel multiprocessor systemsHALNCR.DLL HAL for NCR SMP computersHALOLI.DLL HAL for Olivetti SMP computersHALSP.DLL HAL for Compaq SystemproHALWYSE7.DLL HAL for Wyse7 systemsHAL files for DEC Alpha Computers:Filename Description---------------------------------------------------HAL0JENS.DLL Digital DECpc AXP 150 HALHALALCOR.DLL Digital AlphaStation 600 FamilyHALAVANT.DLL Digital AlphaStation 200\400 Family HALHALEB64P.DLL Digital AlphaPC64 HALHALGAMMP.DLL Digital AlphaServer 2x00 5\xxx Family HALHALMIKAS.DLL Digital AlphaServer 1000 Family Uniprocessor HALHALNONME.DLL Digital AXPpci 33 HALHALQS.DLL Digital Multia MultiClient Desktop HALHALSABMP.DLL Digital AlphaServer 2x00 4\xxx Family HALHAL files for MIPS Computers:Filename Description---------------------------------------------------HALACR.DLL ACER HALHALDTI.DLL DESKStation EvolutionHALDUOMP.DLL Microsoft-designed dual MP HALHALFXS.DLL MTI with a r4000 or r4400HALFXSPC.DLL MTI with a r4600HALNECMP.DLL NEC dual MPHALNTP.DLL NeTpower FASTseriesHALR98MP.DLL NEC 4 processor MPHALSNI4X.DLL Siemens Nixdorf UP and MPHALTYNE.DLL DESKstation TyneHAL files for PPC Computers:Filename Description---------------------------------------------------HALCARO.DLL HAL for IBM-6070HALEAGLE.DLL HAL for Motorola PowerStack and Big BendHALFIRE.DLL Hal for Powerized_ES, Powerized_MX, and Powerized_MX MPHALPOLO.DLL HAL for IBM-6030HALPPC.DLL HAL for IBM-6015HALWOOD.DLL HAL for IBM-6020
How to Determine Which HAL to Use:
During installation, a text log file is created. This file has a line whichshows which HAL is installed during setup. If the HAL has changed afterthe original Setup, the SETUP.LOG does not reflect the change. To verify,do the following:
- Go to %SystemRoot%\REPAIR subdirectory.
- Run ATTRIB -R -H -S SETUP.LOG to make the file visible.
- Use Notepad to view SETUP.LOG and search for "Hal".
Copy the HAL into the Symbol Tree:
- Change directory to \SYMBOLS\DLL.
- Rename HAL.DBG to HAL.X86.
- Copy the "Custom HLL.DBG" to HAL.DBG.
After the Symbol Tree Is CreatedThe symbol tree is now complete. For more information, query on thefollowing word here in the Microsoft Knowledge Base:
Article ID: 148659 - Last Review: 12/04/2015 14:23:36 - Revision: 3.1
- kbnosurvey kbarchive KB148659