It's not widely known that bash has its own debugger - possibly because most Linux distributions don't install it by default. Linux.com show how to install it, and show a number of examples of using it to debug your own scripts.
Tim Jones has written an article on the gcc extensions that are used within the Linux kernel, such as zero-length arrays (normally arrays must have at least one element defined), type discovery, ranges within switch/case blocks and prefetching.