An Example Session
Consider the following source-code written in C:
#includeUsing the GCC compiler on GNU/Linux, the code above must be compiled using the -g
flag in order to include appropriate debug information on the binary generated, thus making it possible to inspect it using GDB. Assuming that the file containing the code above is named example.c
, the command for the compilation could be:
And the binary can now be run:
# ./example Segmentation faultSince the example code, when executed, generates a segmentation fault, GDB can be used to inspect the problem.
# gdb ./example GNU gdb (GDB) Fedora (7.3.50.20110722-13.fc16) Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or laterRead more about this topic: GNU Debugger
Famous quotes containing the word session:
“The bar is the male kingdom. For centuries it was the bastion of male privilege, the gathering place for men away from their women, a place where men could go to freely indulge in The Bull Session ... the release of the guilty anxiety of the oppressor class.”
—Shulamith Firestone (b. 1945)