![]()
The Art of Debugging With GDB,
DDD, & Eclipse ![]()
Book Review
![]()
By
Dale Farris, Reviews CoordinatorGolden Triangle PC Club October 2008 General Overview Debugging is crucial to successful software development, but even many experienced programmers find it challenging. Sophisticated debugging tools are available, yet it may be difficult to determine which features are useful in which situations. The Art of Debugging is your guide to making the debugging process more efficient and effective. The Art of Debugging illustrates the use three of the most popular debugging tools on Linux / Unix platforms: GDB, DDD, and Eclipse. The text-command based GDB (the GNU Project Debugger) is included with most distributions. DDD is a popular GUI front end for GDB, while Eclipse provides a complete integrated development environment. In addition to offering specific advice for debugging with each tool, authors Norm Matloff and Pete Salzman cover general strategies for improving the process of finding and fixing coding errors, including how to: Inspect variables and data structures Understand segmentation faults and core dumps Know why your program crashes or throws exceptions Use features like catchpoints, convenience variables, and artificial arrays Avoid common debugging pitfalls Real world examples of coding errors help to clarify the authors’ guiding principles, and coverage of complex topics like thread, client-server, GUI, and parallel programming debugging will make you even more proficient. You'll also learn how to prevent errors in the first place with text editors, compilers, error reporting, and static code checkers. Whether you dread the thought of debugging your programs or simply want to improve your current debugging efforts, you'll find a valuable ally in The Art of Debugging. Table of Contents The book's eight (8) chapters include the following: Ch 1 - Some Preliminaries for Beginners and Pros Ch 2 - Stopping to Take a Look Around Ch 3 - Inspecting and Setting Variables Ch 4 - When a Program Crashes Ch 5 - Debugging in a Multiple-Activities Context Ch 6 - Special Topics Ch 7 - Other Tools Ch 8 - Using GDB / DDD / Eclipse for Other Languages Authors Norman Matloff Peter Jay Salzman About the Authors Norman Matloff, a computer science professor at UC Davis, is the author of several popular public-domain software packages and online tutorials. Peter Jay Salzman earned his PhD in physics from UC Davis and founded the Linux Users Group of Davis. He is currently a programmer. ISBN ISBN 10: 1-59327-002-X ISBN 13: 978-1-59327-002-5 Price $39.95 Features 280 pages; preface; figures; note tips; index Targeted Customers This book is aimed at computer programmers, including programming students, who are interested in these 3 powerful programming debugging tools, in addition to or even instead of their traditional print statements. The authors explain how to debug threads code, why breakpoints sometimes end up at slightly different locations than where the programmer set them, why the GDB "until" command sometimes jumps to a surprising place, some cool tricks that can be done with DDD and Eclipse, how GDB has value in today's GUI age, why a segmentation fault did not occur when erroneous code exceeds the bounds of an array, and why one of the authors' example data structures is named "nsp." The book is intermediate to a glorified user's manual and an abstract treatise on the cognitive theory of the debugging process. They provide information on the "how-to" for specific commands in the tools, but they also set forth and make frequent use of some general principles for the debugging process. The 3 tools covered were selected because of their popularity in the Linux / open source communities. Their examples slightly favor GDB, not only because its text-based nature makes it more compact to present on a page, but also because they find that text-based commands still play a valuable role in the debugging process. Eclipse has become widely used for much more than simply the debugging role the authors describe, and it does provide an attractive, versatile tool for debugging. DDD has a much smaller footprint and includes some powerful features not found in Eclipse. Though the book focuses on C / C++, the authors have included coverage of other languages, including Java, Python, Perl, and assembly language. Obviously, any reader who is unfamiliar with either of these 3 three tools, or has never before been involved in computer programming is not the targeted customer for this book. The information is highly specialized and mainly of interest to computer programmers and students learning programming. Book Updates Visit www.nostarch.com/debugging.htm for updates, errata, an other information related to the book. About No Starch Press San Francisco based No Starch Press, Inc., publisher of such best-selling titles as "Steal This Computer Book 3," "The Book of JavaScript," and "The Linux Cookbook," is an independent publishing company committed to producing readable, information-packed computer books that make a difference. No Starch focuses on Open Source, Web development, computer security, programming tools, and alternative operating systems. No Starch authors are highly regarded experts who have the rare ability to write about complex topics clearly and concisely. As a result, No Starch books share a no-nonsense manner that both educates and entertains. The Linux Journal Press series offers readers books on cutting-edge Open Source topics that make a difference, in an effort to advance the acceptance and usability of Linux. Recent titles include "The Book of Zope," "Programming Linux Games," and "The Linux Cookbook." Linux Journal Press titles are developed in partnership with Linux Journal. The No Starch international distribution network brings their books to all major English-language and critical non-English language markets. Their U.S. distributor, Publishers Group West (PGW), is the largest U.S. distributor for independent book publishers. PGW sells to all major wholesalers (Ingram, Baker & Taylor, Bookazine, Koen, etc.), national chains and independents, online booksellers, and academic and technical bookstores. No Starch also aggressively pursues sales in non-traditional channels, including corporate and premium sales, bulk sales, and book clubs. The No Starch international distributors (including JGA in Canada, Computer Bookshops in the UK, Woodslane in Australia/New Zealand) reach all major English and non-English markets with large technical populations. They also maintain extensive contacts with international publishers who translate their books and bring them to their markets in their local language. William Pollock, founder and publisher of No Starch Press, Inc. (and co-founder of APress) has over fifteen years of book publishing experience. No Starch Press benefits from his experience in professional reference, scientific, college, and trade publishing. Mr. Pollock has worked his way up through the publishing ranks from editorial assistant, to sales representative, to acquisitions editor, to publisher. He knows the book publishing business from the ground up. Contact Travis Peterson Sales & Marketing Assistant No Starch Press 555 De Haro St., Suite 250 San Francisco, California 94107 800-420-7240 415-863-9900, Ext. 300 FAX 415-863-9950 travis@nostarch.com www.nostarch.com |