Chapter 10. Debugging
Throughout this book, you have learned about a wide range of technologies that are available for Linux systems. You have studied a variety of examples and (hopefully) have tested some of these examples out for yourself. But it is also quite likely that you have experienced at least one or two bugs in the course of working with Linux—an inevitable consequence of working with any computer software. Linux may be openly developed by skillful people all around the world, but no software is bug free.
In this chapter, you will learn about some of the debugging techniques available to you as you write code for Linux systems. The chapter is divided into three logical sections. First, you'll learn about the gdb command line GNU debugger utility and how to use some of its powerful command set. Then, you will learn about higher level graphical debugging built upon gdb, using tools such as ddd and Eclipse. Finally, you will delve into kernel debugging using a UML (User Mode Linux) kernel as an example.
By the end of this chapter, you should have a good understanding of the range of debugging tools available to Linux programmers. You should feel comfortable in the basic use of these tools and be empowered to learn more through your own experimentation. Bear in mind that debugging is, by its very nature, a complex and difficult task that can take many years to fully master. Don't expect that you'll be an expert after reading this chapter alone—you need to put these techniques ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access