“It Can’t Be a Bug, My Makefile Depends on It!” 187
it crashes is to run every program from your debugger.^2 If you want to
debug interrupts, your debugger program must intercept every interrupt and
forward the appropriate ones to your program. Can you imagine running an
emacs with three context switches for every keystroke? Apparently, the
idea of routine debugging is alien to the Unix philosophy.
Date: Wed, 2 Jan 91 07:42:04 PST
From: Michael Tiemann <[email protected]>
To: UNIX-HATERS
Subject: Debuggers
Ever wonder why Unix debuggers are so lame? It’s because if they
had any functionality at all, they might have bugs, and if they had
any bugs, they might dump core, and if they dump core, sploosh,
there goes the core file from the application you were trying to
debug. Sure would be nice if there was some way to let applications
control how and when and where they dump core.
The Bug Reliquary
Unlike other operating systems, Unix enshrines its bugs as standard
operating procedure. The most oft-cited reason that Unix bugs are not fixed
is that such fixes would break existing programs. This is particularly ironic,
considering that Unix programmers almost never consider upward
compatibility when implementing new features.
Thinking about these issues, Michael Tiemann came up with 10 reasons
why Unix debuggers overwrite the existing “core” file when they them-
selves dump core:
Date: Thu, 17 Jan 91 10:28:11 PST
From: Michael Tiemann <[email protected]>
To: UNIX-HATERS
Subject: Unix debuggers
David Letterman’s top 10 weenie answers are:
- It would break existing code.
9. It would require a change to the documentation.
8. It’s too hard to implement.
(^2) Yes, under some versions of Unix you can attach a debugger to a running program,
but you’ve still got to have a copy of the program with the symbols intact if you
want to make any sense of it.