For beginners in C:http://www.thegeekstuff.com/2010/03/debug-c-program-using-gdb/
(note: info args to know the arguments passed to the function and info locals to print local variables (in the currentstack frame)http://www.geeksforgeeks.org/memory-layout-of-c-program/Linux Download kernel source code: http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.3.3-wily/