To view source code in GDB, type "list" or "l". This will display the source code for the lines around the current line being executed. To trace back in GDB, use the "backtrace" or "bt" command to print the entire stack. GDB may not stop at breakpoints until an instruction is executed.