GNU Debugger

[4] GDB is free software released under the GNU General Public License (GPL).

[6] GDB offers extensive facilities for tracing and altering the execution of computer programs.

GDB target processors (as of 2003) include: Alpha, ARM, AVR, H8/300, Altera Nios/Nios II, System/370, System 390, x86 and its 64-bit extension x86-64, IA-64 "Itanium", Motorola 68000, MIPS, PA-RISC, PowerPC, RISC-V, SuperH, SPARC, and VAX.

Lesser-known target processors supported in the standard release have included A29K, ARC, ETRAX CRIS, D10V, D30V, FR-30, FR-V, Intel i960, 68HC11, Motorola 88000, MCORE, MN10200, MN10300, NS32K, Stormy16, and Z8000.

The same mode is also used by KGDB for debugging a running Linux kernel on the source level with gdb.

On architectures where hardware debugging registers are available, watchpoints can be set which trigger breakpoints when specified memory addresses are executed or accessed.

The problem is present in line 7, and occurs when calling the function strlen (because its argument, s, is NULL).

Depending on the implementation of strlen (inline or not), the output can be different, e.g.: To fix the problem, the variable a (in the function main) must contain a valid string.