Here we are happily working on our program. We recompile file1.c, then re-link. % gcc -c file1.c % gcc file1.o file2.o file3.o file4.o file5.o % ./a.out Segmentation fault % ok, let's run gdb. First, recompile all files with -g, and re-link with -g (all in the one 'gcc' command). % gcc -g file1.c file2.c file3.c file4.c file5.c % gdb a.out GNU gdb 19991004 Copyright 1998 Free Software Foundation, Inc. (gdb) run Starting program: /home/ajr/a.out Program received signal SIGSEGV, Segmentation fault. 0x80483fa in f (p=0x0) at file1.c:16 16 printf("%d\n", *p); This tells us that the function is named "f", and it's line 16 of file1.c on which the exception occurred. It also tells us that the parameter 'p' had value 0, in hexadecimal, which is the representation of the null pointer on this machine. (gdb) where #0 0x80483fa in f (p=0x0) at file1.c:16 #1 0x80483e6 in main () at file1.c:8 This tells us everyone who called this function and what parameters they passed in. You can also show the values of local variables by typing "print var", e.g. "print p" (without the quotes). It interprets variable names as local to the current function. You can use the commands "up" and "down" to change the "current" function. Mostly, I think you will be using the 'where' command, or just the better run-time error message with file location. If you're not seeing file names, line numbers, variable names, etc, you didn't compile with '-g'. Note that I recompiled all .c files above; "gcc -g file1.o ..." would not have sufficed.