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 debugger:
gdb mysourcefile.out
Things you can do [...]
Archives for posts tagged ‘GNU debugger’
Debugging C++ code (UNIX)
Friday, 3 October 2008