RAD Studio (Common)
ContentsIndex
PreviousUpNext
C++ Compiler Debugging

ProjectOptionsC++ CompilerDebugging 

Use this dialog box to set C++ compiler debugging and CodeGuard options.

Build Configuration 
Displays the active build configuration. Use the drop-down menu to select another build configuration.  
Save As... 
Displays the Save As dialog box to save the current configuration's options to a file that can be loaded as a named option set.  
Load... 
Displays the Apply Option Set dialog box to apply the options in a named option set to the current configuration.  

 

Debugging options 
Description 
Debug information (-v) 
Includes debugging information in your .OBJ files. The compiler passes this option to the linker so it can include the debugging information in the .EXE file. For debugging, this option treats C++ inline functions as normal functions.
You need debugging information to use either the integrated debugger or the standalone Turbo Debugger.
When this option is off (-v-), you can link and create larger object files. While this option does not affect execution speed, it does affect compilation and link time.
When Line Numbers is on, make sure you turn off Pentium scheduling in the Compiler options. When this option is set, the source code does not exactly match the generated machine instructions, which can make stepping through code confusing.
Default = false  
Debug line number information (-y) 
Automatically includes line numbers in the object and object map files. Line numbers are used by both the integrated debugger and Turbo Debugger.
Although the Debug Info in OBJs option (-v) automatically generates line number information, you can turn that option off ( -v-) and turn on Line Numbers (-y) to reduce the size of the debug information generated. With this setup, you can still step, but you cannot watch or inspect data items.
Including line numbers increases the size of the object and map files but does not affect the speed of the executable program.
When Line Numbers is on, make sure you turn off Pentium scheduling in the Compiler options. When this option is set, the source code does not exactly match the generated machine instructions, which can make stepping through code confusing.
Default = false  
Expand inline functions (-vi)* 
Expands C++ inline functions inline.
To control the expansion of inline functions, the Debug Information In OBJs option (-v) acts slightly different for C++ code: when inline function expansion is disabled, inline functions are generated and called like any other function.
Default = true  
Generate CodeView4–compatible debug info (-v4) 
Generates CodeView4 compatible debug information. Default = false  

 

CodeGuard(tm) options 
Description 
Enable all CodeGuard options (-vG) 
Enables all CodeGuard options, independent of CodeGuard level. Default = false  
Monitor inline pointer access (-vGc) 
This CodeGuard option generates calls to verify all accesses in your code. This option identifies almost all pointer errors. Program execution is typically five to ten times slower.
Selecting any of these CodeGuard options can have a noticeable effect on runtime performance.
Default = false  
Monitor global and stack data accesses (-vGd) 
Creates data and stack layout descriptors for fast lookup by CodeGuard. These descriptors allow CodeGuard to report overruns and invalid pointers to locals, globals, and statics. You should always use this option. Default = false  
Monitor 'this' pointer on member function entry (-vGt)  
Creates special epilogs for member functions, constructors, and destructors. CodeGuard verifies the this pointer on entry to every method in C++ code. This option is useful because it reports calls to methods of deleted or invalid objects even if the methods themselves do not access this. Default = false  

 

General option 
Description 
Default 
Saves the current settings as the default for each new project.  

Note: If you want to turn both debugging and inline expansion on, use the -v and -vi options.

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!