debug - Chapter 20 Debuggers A debugger is a very useful...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Chapter 20 Debuggers A debugger is a very useful tool for developing codes, and in finding and fixing bugs introduced in the code development. Most compiler providers include a debugger as part of their software bundle. Since we are using the Portland Group compiler for the class, the discussion here will center on its debugger primarily, even though a lot of the information applies equally to other compiler/debugger systems. Check the manual for the specific compiler/debugger in case of problems. 20.1 Preparing the code for debugging A debuggable executable must have extra information embedded in it for debugging purposes. The debugger then makes use of this information to report the values of variables, and allow the programmer to follow the execution of the program line by line. Compiler options must be used to instruct the compiler to embed this information in the object files. Here is a useful subset of these options pertinent to the PG compiler: 1.-g Generate information for the debugger, this is necessary on most com- puters to enable the printing of useful debugging information. Avoid using any optimization in the code development phase (so avoid the...
View Full Document

This note was uploaded on 01/08/2012 for the course MSC 321 taught by Professor Staff during the Fall '08 term at University of Miami.

Page1 / 3

debug - Chapter 20 Debuggers A debugger is a very useful...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online