-g

Category

Error checking and debugging

Pragma equivalent

None.

Purpose

Generates debug information for use by a symbolic debugger.

Syntax

Read syntax diagramSkip visual syntax diagram
>>- -g---------------------------------------------------------><

Defaults

Not applicable.

Usage

Specifying -g will turn off all inlining unless you explicitly request it with an optimization option.

To specify that source files used with -g are referred to by either their absolute or their relative path name, use the -qfullpath option.

You can also use the -qlinedebug option to produce abbreviated debugging information in a smaller object size.

Predefined macros

None.

Examples

To compile myprogram.c to produce an executable program testing so you can debug it, enter:
xlc myprogram.c -o testing -g 

Related information