From: David Woodhouse <dwmw2@infradead.org>
To: Keith Owens <kaos@melbourne.sgi.com>
Cc: Hiro Yoshioka <hyoshiok@miraclelinux.com>,
kdb@oss.sgi.com, linux-kernel@vger.kernel.org,
linux-ia64@linuxia64.org
Subject: Re: [Linux-ia64] Announce: kdb v1.9 is available for kernel 2.4.16
Date: Tue, 04 Dec 2001 11:36:09 +0000 [thread overview]
Message-ID: <14342.1007465769@redhat.com> (raw)
In-Reply-To: <21084.1007432885@kao2.melbourne.sgi.com>
In-Reply-To: <21084.1007432885@kao2.melbourne.sgi.com>
kaos@melbourne.sgi.com said:
> http://www.lib.uaa.alaska.edu/linux-kernel/archive/2000-Week-36/0575.html
> http://marc.theaimsgroup.com/?l=linux-kernel&m=96865229622167&w=2
The answer, of course, is to do all your debugging in the MIPS kernel, which
even in Linus' tree contains gdb stubs, although I think Linus' tree is
missing the gdbconsole which sends all printk output as GDB $O packets.
(gdb) tar rem /dev/ttyS0
Remote debugging using /dev/ttyS0
0x80110070 in breakinst ()
(gdb) cont
Continuing.
CPU revision is: 00002721
FPU revision is: 00002720
Primary instruction cache 16KiB.
Primary data cache 16KiB.
Secondary cache 256KiB, linesize 32 bytes.
Enabling secondary cache...Done
Tertiary cache present, not (yet) enabled
TLB has 64 entries.
Linux version 2.4.16-0.4 (dwmw2@passion.cambridge.redhat.com) (gcc version
While I sort of see Linus' point, there are two cases where it falls down
most often for me.
Firstly, roughly half the bugs which I track by poking around with GDB are
caused by toolchain/compiler problems, not by bogus code. Looking at the
code and thinking hard does _not_ help you here. You have to see what's
buggered, compare the code with the asm and slowly find out what went wrong.
If BUG() contains a breakpoint and you can poke at it all immediately,
that's a _lot_ easier than forty-five recompilations and reboots with extra
printks in random places, the final one of which changes the compiler's
output so it no longer exhibits the same bug.
Secondly, the point about not having a debugger making you more careful may
be true - but half the time I track bugs, they're not in my own code. In
fact, I'd go as far as to say the 99% of the bugs I actually use GDB for
aren't in my own code. Some _other_ bugger has been careless, and I'm here
trying to pick up the pieces.
(Sorry for taking the bait - but anything's better than the evolution thread)
--
dwmw2
next prev parent reply other threads:[~2001-12-04 11:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-03 6:11 Announce: kdb v1.9 is available for kernel 2.4.16 Keith Owens
2001-12-03 7:43 ` Christoph Hellwig
2001-12-03 8:40 ` Keith Owens
2001-12-03 14:38 ` Juan Quintela
2001-12-04 1:50 ` [Linux-ia64] " Hiro Yoshioka
2001-12-04 2:28 ` Keith Owens
2001-12-04 11:36 ` David Woodhouse [this message]
2001-12-04 18:04 ` slurn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=14342.1007465769@redhat.com \
--to=dwmw2@infradead.org \
--cc=hyoshiok@miraclelinux.com \
--cc=kaos@melbourne.sgi.com \
--cc=kdb@oss.sgi.com \
--cc=linux-ia64@linuxia64.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox