GDB GDB Compile with a different compiler Compile with debug information Compile with a different compiler ./configure CC=/usr/local/bin/gcc-9 Compile with debug information ./configure CFLAGS="-g -O2" Note that flags can be combined as needed.