Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom Debugger Guide - before you can debug a program, you must put<b> debugging information</b> into the http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Before you can debug a program, you must put debugging information into the
code.

There are three different formats of debugging information that can be put
into the code - "Watcom", "Dwarf" or "Codeview".  Starting with version
10.7, the default format is "Dwarf".  In earlier releases, the default was
"Watcom".  Although the debugger supports all three formats, it is best if
you allow the default format to be generated.

To produce an executable that has debugging information, you need to:

 1. specify the correct compiler options when you compile, and

 2. specify the correct linker options when you link.

During development, use the d2 option of the compiler and use the debug all
directive at the beginning of your linker command line or at the beginning
of your linker directive file.  This will ensure that maximum debugging
information is available during your debugging session.  Change to the d1
option when you need to create a distribution version of your product.  This
is necessary since the d2 option disables most compiler optimizations,
whereas d1 will not affect the quality of generated code.  During
production, you can use the linker's symfile option to put the d1 debugging
information into a separate file.  This lets you distribute a production
quality executable yet still have the luxury of source line debugging when
bugs are reported.

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