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

ProjectOptionsC++ CompilerDebugging 

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

Build Configuration options 
Description 
Build Configuration  
Displays the name of the current build configuration associated with the options on this page. There are three default build configurations: Base, Debug, and Release.  
Apply Options...  
Displays the Apply Option Set dialog box to apply the options in a named option set to the current configuration.  

 

Common items 
Description 
Value from <parent configuration or option set>  
Indicates the value in the parent build configuration or referenced option set. If you change this value here, the change will potentially affect the Base configuration (that is, if you click OK on the Project->Options dialog and subsequently build your project).  
<any item in red print>  
Indicates that this option has secondary options available. To view the secondary options, click the + sign in front of the option in red.  
<any item in boldface print>  
Indicates that the value of this option has been changed from the value in the parent configuration or referenced option set.  
Down Arrow Pop-Up Button  
Appears after you click an option that has specific choices available (such as True, False). Click Down Arrow to display and choose from the available choices.  

 

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  
Enable CodeGuard (-vG)  
Turns on CodeGuard options as specified below (that is, setting this option False disables CodeGuard even though -vGx might be set to True). 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  
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 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.
Click the down-arrow to select from the possible values (True, False). 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  

 

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) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!