Re: ksyms for kgdb

David Hinds (dhinds@allegro.stanford.edu)
Sat, 7 Oct 1995 15:42:20 -0700 (PDT)


> From: Linus Torvalds <Linus.Torvalds@cs.helsinki.fi>
>
> Uwe Bonnes: "Ksyms for kgdb" (Oct 4, 23:23):
> >
> > I think having kgdb is a handy tool for kernelhackers. So I was surprised
> > however that even in 1.3.30 the symbols from the kdebug-1.1/mm.patch are
> > still missing?

The primary reason is that I've never submitted the mm patch to Linus
because I couldn't see any use for it outside of kdebug, and I doubted
he would add it to the kernel on just that basis. Seems I was right :)

> I do see some good points in a kernel debugger, but I have yet to be
> convinced that the good things outweigh the bad. The only valid uses of
> debuggers is to get a stack backtrace and a register dump, imho, and
> that is what you get from a kernel panic anyway (and the ksymoops.cc
> program will actually make it readable for others than just me ;-)
>
> I'm afraid that I've seen too many people fix bugs by looking at
> debugger output, and that almost inevitably leads to fixing the symptoms
> rather than the underlying problems.

While I have a lot of respect for Linus, I think this attitude is
insane. Debuggers are not a panacea for poor program design. But in
the hands of a good programmer, a debugger can be an extremely
powerful tool. As with all tools, a debugger is only as good as the
person using it.

I don't see how not having a debugger would make debugging more
effective. I suppose that since it makes debugging that much more
difficult, it cuts down the number of people likely to even attempt
it, so only the die-hard hackers are left. Given the choice between
using a debugger or not, I'll take the debugger, thank you :)

-- Dave Hinds
dhinds@allegro.stanford.edu