In a perfect world, computer programs would not have any bugs. Unfortunately, we do not live in this perfect world and normally programs have many errors. New programs tend to be error-prone. Tools exist which help us find and analyze these errors. Probably the most well-known under Linux is the user space debugger, gdb, but there are many others.
Since Linux is Open Source code and everyone can modify and compile his or her own kernel, kernel debugging becomes more and more important. For kernel debugging, other tools exist than for user space debugging. Common symptoms of kernel-related problems are kernel panics, oopses, and deadlocks.
In this chapter, we will concentrate on particulars of mainframe debugging. We will look at basics of the Linux on zSeries design, which are necessary for successful debugging, and we will introduce several tools which can be used. Both user space and kernel debugging will be described.