5.1 Preparing Symbol Files for 80386 Debugger

To prepare application symbol files, perform the following steps:

1.Compile your C-language source files, using the appropriate command-line option to generate object files with line-number information for use by 80386 Debugger. For more information about compiler options, see the documentation that accompanied your compiler.

2.Link the compiled code with the standard Windows libraries, using the appropriate command-line option to prepare a symbol map (.MAP) file that includes PUBLIC symbols. The map file is required by Microsoft Symbol File Generator (MAPSYM).

You may also want to use the linker option for display of line-number information. For more information about linker options, see the documentation that accompanied your linker.

3.Run MAPSYM to create a symbol file for symbolic debugging. MAPSYM converts the contents of your application's symbol map (.MAP) file into a form suitable for loading with 80386 Debugger; then MAPSYM copies the result to a symbol (.SYM) file.

Following is the command-line syntax for MAPSYM:

mapsym [/l][/n] mapfilename

/l

Directs MAPSYM to display information on the screen about the conversion. The information includes the names of groups defined in the application, the application start address, the number of segments, and the number of symbols per segment.

/n

Directs MAPSYM to ignore line-number information in the map file. The resulting symbol file contains no line-number information.

mapfilename

Specifies the filename for a symbol map file that was created during linking. If you do not give a filename extension, .MAP is assumed. If you do not give a full path, the current directory and drive are assumed. MAPSYM creates a new symbol file having the same name as the map file but with the .SYM extension.

In the following example, MAPSYM uses the symbol information in FILE.MAP to create FILE.SYM in the current directory on the current drive:

mapsym /l file.map

Information about the conversion is sent to the screen.

Note:

MAPSYM always places the new symbol file in the current directory on the current drive.

MAPSYM can process up to 10,000 symbols for each segment in the application and up to 1024 segments.