Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Blinker 5.10 Online Reference - <b> generating compiler debugging information</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Generating compiler debugging information
------------------------------------------------------------------------------
 CodeView debugging information must be provided in the .OBJ files generated
 by the compiler or assembler being used, since the information required is
 more detailed than that which is normally contained in an .OBJ file.

 Most compilers have at least one debugging switch to enable the provision of
 this information, and will certainly have an option to at least generate
 source code line numbers. Each module to be debugged must be compiled with
 the appropriate debugging switches for the compiler being used. Please
 consult your compiler manual for further details if your compiler is not
 listed below :

 Borland assemblers    -Zi
 Borland compilers     -v
 FORCE 2.x             -z
 FORCE 4.x             -Zd, -Zi
 Microsoft assemblers  -Zi
 Microsoft compilers   -Zi
 Symantec C++          -g
 Watcom C++            -d2

 To instruct Blinker to include CodeView information in the final .EXE file,
 simply add the CODEVIEW command to the command line or at any point in the
 link script file.

 The MAP command may be used with the S parameter to create a map file
 listing all the segments and the A parameter to list all the public symbols
 in address order. The map file is Microsoft Link compatible, so most
 debuggers which do not support CodeView information should be able to use
 the map file for debugging purposes.

 Real mode overlays

 Any program using overlaid code while debugging under CodeView must use the
 external overlaying method via the SECTION INTO command. External overlaying
 is a global option, so all overlaid code must be either external or
 internal.

 For example, to debug module TEST2 in Microsoft C++ under CodeView :
 Compile with debugging information :

 CL -c -Zi test2.c

 Modify the link file to move TEST2 to the root and add the CODEVIEW command.
 Note: that Blinker requires external overlays be specified in order to
 generate CodeView information for an overlaid program.

 # TEST.LNK with full debugging
 CODEVIEW             # Include CodeView information
 SECTION INTO TEST    # External overlay required
 BEGIN                # Start of overlays
    FILE TEST1        # The first overlaid file
    FILE TEST3        # The third overlaid file
 END                  # End of overlays
 FILE TEST2           # The module to be debugged
                      # is now in the root

 Re-link and then run the program under CodeView :

 BLINKER @TEST
 CV TEST

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson