Archives for posts tagged ‘GNU debugger’

Debugging C++ code (UNIX)

This assumes you're inside a UNIX terminal window (e.g., PuTTY session to remote UNIX box). Compile a .cpp source file in the GNU debugger: g++ -g -Wall -o mysourcefile.out mysourcefile.cpp Before starting gdb, make sure you're in the same directory as the executable just compiled above. Then call gdb: add GNU Then start the gdb [...]