O'Reilly logo

The Art of Debugging with GDB and DDD by Peter Jay Salzman, Norman Matloff

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 6. SPECIAL TOPICS

SPECIAL TOPICS

Various issues arise during debugging that do not deal with debugging tools. We'll cover some of these issues in this chapter.

What If It Doesn't Even Compile or Load?

Invaluable as GDB, DDD, and Eclipse are, they can't help you if your program doesn't even compile. In this section we'll give you some tips on dealing with this situation.

Phantom Line Numbers in Syntax Error Messages

Sometimes the compiler will tell you you've got a syntax error in line x, when in fact line x is perfectly correct, and the real error is in an earlier line.

For example, here is the source file bintree.c from Chapter 3, with a syntax error thrown ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required