
To also include macro definitions in the debug information, use the -g3 option instead of -g. However, changing the optimization level changes the executable code and may change the actual behaviour including removing some bugs. For improved debugging experience, consider setting the optimization with the -Og option. Optimizations performed by the compiler and linker can result in executable code which is hard to relate to the original source code: variables may be optimized out, loops unrolled, operations merged into the surrounding ones etc. Options for running a RHEL 6 or 7 application on RHEL 8 Compatibility-breaking changes in compilers and development tools Using SystemTap from the GCC Toolset 11 Perftools container image Example: Using the GCC Toolset 11 Toolchain container image

Accessing and running the GCC Toolset container images Tools and versions provided by GCC Toolset 11 Tools and versions provided by GCC Toolset 10 Tools and versions provided by GCC Toolset 9 Installing individual packages from GCC Toolset Dumping protected process memory with GDB Creating and accessing a core dump with coredumpctl Inspecting application crash states with core dumps Recording application crashes with core dumps Core dumps: what they are and how to use them Using GDB to intercept handling of signals by applications Using GDB to intercept application system calls Monitoring application’s system calls with SystemTap Monitoring application’s library function calls with ltrace Monitoring an application’s system calls with strace Tools useful for recording application interactions Debugging forking or threaded programs with GDB Using GDB watchpoints to stop execution on data access and changes Using GDB breakpoints to stop execution at defined code locations Inspecting Application Internal State with GDB Getting debuginfo packages for an application or library manually Getting debuginfo packages for an application or library using GDB Enabling debugging of C and C++ applications with GCC Enabling Debugging with Debugging Information Compatibility-breaking changes in GCC in RHEL 8 Example: Building a C program using a Makefile Creating static libraries with GCC and ar

Using both static and dynamic libraries with GCC Setting up to measure performance of applications Setting up to develop applications using C and C++ Setting up to manage application versions
