Show: Object Pascal C++
Display Preferences

C++ Compiler Debugging

From Appmethod Topics
Jump to: navigation, search

Go Up to C++ Compiler


Project > Options > C++ Compiler > Debugging

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

Options Description

Target, Apply, Save

See Target Options.

Common items

See Common Items on Project Options Pages.

Debugging Options Description Compiler support
bcc32 bcc32c bcc64 bccosx bcciosarm bcciosarm64 bccaarm

Debug information


Generate source level debug information

Includes debugging information in your .OBJ files. The compiler passes this option to the linker so it can include the debugging information in the TDS debug file. For debugging, this option treats C++ inline functions as normal functions. To use the integrated debugger, you need debugging information.

When this option is off, 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 Enable Pentium instruction scheduling on the C++ Compiler Optimizations page. 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

YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png
YesC++11Feature.png

Debug line number information

Automatically includes line numbers in the object and object map files. Line numbers are used by the integrated debugger.

Although the Debug information option automatically generates line number information, you can turn that option off and turn on Line Numbers 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 Enable Pentium instruction scheduling on the C++ Compiler Optimizations page. 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

YesC++11Feature.png
YesC++11Feature.png

Enable CodeGuard

Turns on CodeGuard options as specified below. Disabling this option disables CodeGuard, even if some of the child options below are enabled. Default = False

Monitor 'this' pointer on member function entry

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

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

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 run-time performance. Click the down-arrow to select from the possible values (True, False). Default = False

YesC++11Feature.png

Expand inline functions

Expands C++ inline functions inline. To control the expansion of inline functions, the Debug information option acts slightly different for C++ code: when inline function expansion is disabled, inline functions are generated and called like any other function. Default = True

YesC++11Feature.png
YesC++11Feature.png

Generate CodeView4-compatible debug info

Generates CodeView4 compatible debug information. Default = False

YesC++11Feature.png
YesC++11Feature.png
Note: If you want to turn both debugging and inline expansion on, use the Debug information and Expand inline functions options.

See Also

Personal tools
In other languages