Skip to content

Art of Debugging with GDB, DDD, and Eclipse

Best in textbook rentals since 2012!

ISBN-10: 1593271743

ISBN-13: 9781593271749

Edition: 2008

Authors: Norman Matloff, Peter Salzman

List price: $39.95
Blue ribbon 30 day, 100% satisfaction guarantee!
what's this?
Rush Rewards U
Members Receive:
Carrot Coin icon
XP icon
You have reached 400 XP and carrot coins. That is the daily max!

Description:

Debugging is of central importance to successful software development, and yet many beginning programmers are unaware of the techniques they can use to reduce the time they spend finding and fixing programming errors. GDB, a popular open source debugger, allows a programmer to trace program execution line by line, set breakpoints, inspect variables, and look at what the program is doing at any given time. Using an assortment of real world coding errors "from simple typos to major logical blunders "The Art of Debugging with GDB and DDD discusses how to manage memory, understand core dumps, and trace programming errors to their root cause. The book covers topics other debugging books omit…    
Customers also bought

Book details

List price: $39.95
Copyright year: 2008
Publisher: No Starch Press, Incorporated
Publication date: 10/14/2008
Binding: Paperback
Pages: 280
Size: 7.00" wide x 9.25" long x 0.89" tall
Weight: 1.188
Language: English

Norman Matloff, Ph.D., is a Professor of Computer Science at the University of California, Davis. He is the creator of several popular software packages, as well as a number of widely-used Web tutorials on computer topics. He has written articles for the New York Times, the Washington Post, Forbes Magazine, the San Francisco Chronicle, and the Los Angeles Times, among others, and is also the author, with Peter Jay Salzman, of The Art of Debugging (No Starch Press).

Preface
Some Preliminaries for Beginners and Pros
Debugging Tools Used in This Book
Programming Language Focus
The Principles of Debugging
The Essence of Debugging: The Principle of Confirmation
Of What Value Is a Debugging Tool for the Principle of Confirmation?
Other Debugging Principles
Text-Based vs. GUI-Based Debugging Tools, and a Compromise Between Them
Brief Comparison of Interfaces
Compromises
Main Debugger Operations
Stepping Through the Source Code
Inspecting Variables
Issuing an "All Points Bulletin" for Changes to a Variable
Moving Up and Down the Call Stack
Online Help
Introductory Debugging Session
The GDB Approach
The Same Session in DDD
The Session in Eclipse
Use of Startup Files
Stopping to Take a Look Around
Mechanisms for Pause
Overview of Breakpoints
Keeping Track of Breakpoints
Breakpoint Lists in GDB
Breakpoint Lists in DDD
Breakpoint Lists in Eclipse
Setting Breakpoints
Setting Breakpoints in GDB
Setting Breakpoints in DDD
Setting Breakpoints in Eclipse
Extended GDB Example
Persistence of Breakpoints
Deleting and Disabling Breakpoints
Deleting Breakpoints in GDB
Disabling Breakpoints in GDB
Deleting and Disabling Breakpoints in DDD
Deleting and Disabling Breakpoints in Eclipse
"Moving" Breakpoints in DDD
Undoing/Redoing Breakpoint Actions in DDD
More on Viewing Breakpoint Attributes
GDB
DDD
Eclipse
Resuming Execution
In GDB
In DDD
In Eclipse
Conditional Breakpoints
GDB
DDD
Eclipse
Breakpoint Command Lists
Watchpoints
Setting Watchpoints
Expressions
Inspecting and Setting Variables
Our Main Example Code
Advanced Inspection and Setting of Variables
Inspection in GDB
Inspection in DDD
Inspection in Eclipse
Inspecting Dynamic Arrays
What About C++?
Monitoring Local Variables
Examining Memory Directly
Advanced Options for Print and Display
Setting Variables from Within GDB/DDD/Eclipse
GDB's Own Variables
Making Use of the Value History
Convenience Variables
When a Program Crashes
Background Material: Memory Management
Why Does a Program Crash?
Program Layout in Memory
The Notion of Pages
Details on the Role of the Page Table
A Slight Memory-Access Bug Might Not Cause a Seg Fault
Seg Faults and Unix Signals
Other Types of Exceptions
Core Files
How Core Files Are Created
Your Shell May Suppress the Creation of a Core File
Extended Example
First Bug
Don't Leave GDB During a Debugging Session
Second and Third Bugs
Fourth Bug
Fifth and Sixth Bugs
Debugging in a Multiple-Activities Context
Debugging Client/Server Network Programs
Debugging Threaded Code
Review of Processes and Threads
Basic Example
A Variation
GDB Threads Command Summary
Threads Commands in DDD
Threads Commands in Eclipse
Debugging Parallel Applications
Message-Passing Systems
Shared-Memory Systems
Extended Example
OpenMP Overview
OpenMP Example Program
Special Topics
What If It Doesn't Even Compile or Load?
Phantom Line Numbers in Syntax Error Messages
Missing Libraries
Debugging GUI Programs
Debugging Curses Programs
Other Tools
Making Good Use of a Text Editor
Syntax Highlighting
Matching Brackets
Vim and Makefiles
Makefiles and Compiler Warnings
Final Thoughts on a Text Editor as an IDE
Making Good Use of the Compiler
Error Reporting in C
Using errno
Better Living with strace and Itrace
Static Code Checkers: Iint and Friends
How to Use splint
Last Words
Debugging Dynamically Allocated Memory
Strategies for Detecting DAM Problems
Electric Fence
Debugging DAM Problems with GNU C Library Tools
Using GDB/DDD/Eclipse for Other Languages
Java
Direct Use of GDB for Debugging Java
Using DDD with GDB to Debug Java
Using DDD as a GUI for JDB
Debugging Java in Eclipse
Perl
Debugging Perl via DDD
Debugging Perl in Eclipse
Python
Debugging Python in DDD
Debugging Python in Eclipse
Debugging SWIG Code
Assembly Language
Index