Debug support
Use the -g option to enable debug support. In IBM® XL C/C++ for AIX® 16.1.0 and earlier releases, both the stabstrings and DWARF debugging information formats were supported and the default was stabstrings.
IBM Open XL C/C++ for AIX 17.1.3 supports only the DWARF debugging information format and the default DWARF version is DWARF 3.
In IBM Open XL C/C++ for AIX 17.1.3, you can use
the following options to switch DWARF versions:
- -gdwarf-2
- -gdwarf, -gdwarf-3
- -gdwarf-4
IBM Open XL C/C++ for AIX 17.1.3 can generate
DWARF information tuned for the following debuggers:
- The DBX debugger by using the -gdbx option, which is the default
- The GDB debugger by using the -ggdb option
Note: The current release of DBX does not support the DWARF information generated by
IBM Open XL C/C++ for AIX 17.1.3. A
future release of DBX is planned to add this support.
TLS migration considerations for debugging
For debugging purposes, it is recommended that you inspect Thread-Local Storage (TLS) variables by compiling helper functions that return the addresses of these variables and then calling these helper functions from the debugger.
Related information
- -g
- The "Clang command line argument reference" section in the Clang documentation