Journal Articles

CVu Journal Vol 1, #1 - Oct 1987
Browse in : All > Journals > CVu > 011 (10)

Note: when you create a new publication type, the articles module will automatically use the templates user-display-[publicationtype].xt and user-summary-[publicationtype].xt. If those templates do not exist when you try to preview or display a new article, you'll get this warning :-) Please place your own templates in themes/yourtheme/modules/articles . The templates will get the extension .xt there.

Title: Debugging C

Author: Martin Moene

Date: 17 June 2010 08:53:00 +01:00 or Thu, 17 June 2010 08:53:00 +01:00

Summary: Why a book on debugging?

Body: 

TITLE DEBUGGING C
AUTHOR Ward, Robert
PUBLISHER Que Corporation.
ISBN 0-88022-261-1
PRICE 19.95

"Why a book on debugging ?" the author asks in the first chapter. Good question ? Well anyone who had attempted 'Hello, world' and anything more advanced in C would probably be able to give you a good enough answer!

Of course there IS a need for a book about how to fault find software and, although this one is not the whole story, it serves as a good starting point.

The author is quite clear about several points; lets not be ashamed of having to debug programs, rather, come out of the closet and do it properly. Lets carefully categorize the types of problem we're chasing and arm ourselves with the right tools for the job.

Strangely, he seems to suggest that its not a good idea to spend time thinking about the problem while staring at a listing or a screen, but recommends getting in and 'instrumenting' the program to gather more information. (On this last point I feel I may have to beg to differ slightly.)

Although some of the syntax is a little puzzling at times, the author clearly knows what he's talking about. He has been there. Wrongly dimensioned arrays and errant pointers are not new to him. He clearly explains the possible outcomes of such, and other types of C problem and then procedes to present ways to track them down.

His approach is one of accepting that a problem is there and then finding it, rather than preaching about the way you should have written the thing in the first place to avoid the problem.

The author presents several fragments, and a fully operational on-line debugging system. Not a full symbolic debugger but extremely useful nonetheless.

The author takes time to explain just why bugs in C can be so tiresome to locate and is quite thorough in this explanation. In fact, anyone stopping after the first couple of chapters would be quite justified in assuming that the task was in any case impossible, such is the horror and variety of the problems Ward presents.

The text covers technique of stabilizing, locating, tracing and fixing bugs.

He also discusses the use of source level debuggers and compiler/interpreter environments.

In his final chapter, Ward presents a challenge to compiler writers which they would all do well to read. In line with his philosophy of accepting that bugs will appear, he suggests that more in the way of debug facilities could and should be available from compilers.

A worthwhile read and handy to have on the shelf. No one will be an expert in debugging C after reading this book but at least Ward provides the confidence that the bugs can be found somehow!

Notes: 

More fields may be available via dynamicdata ..