C++ Compiler Debugging

From RAD Studio
Jump to: navigation, search

Go Up to C++ Compiler


Project > Options > Building > 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 switches
bcc32 bcc32c bcc64 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

-v

-v

-g

-g

-g

Use Split DWARF

Split DWARF object file which contains debug information produced by the Windows 64-bit Clang-enhanced compiler. For more information see Split DWARF.

Note: Split DWARF is supported on Win 64-bit only.

DWO output directory, Windows 64-bit platform only.

Browse for a folder and select the DWO output directory. The DWO output directory must be an absolute path.

N/A

N/A

-enable-split-dwarf
AND
-split-dwarf-file
PLUS -objcopy utility

N/A

N/A

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 increase the size of the object and map files but do 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

-y

Platform not supported

Platform not supported

Platform not supported

Platform not supported

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

Enable CodeGuard
-vG

Monitor 'this' pointer on member function entry
-vGt

Monitor global stack data accesses
-vGd

Monitor inline pointer access
-vGc

Platform not supported

Platform not supported

Platform not supported

Platform not supported

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

-vi

Platform not supported

N/A

N/A

N/A

Generate CodeView4-compatible debug info

Generates CodeView4 compatible debug information. Default = False

-v4

Platform not supported

Platform not supported

Platform not supported

Platform not supported

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

See Also