Re: [linux-usb-devel] Re: [BK PATCH] USB changes for 2.5.34

Andrew Morton (akpm@digeo.com)
Sun, 15 Sep 2002 12:43:23 -0700


Daniel Jacobowitz wrote:
>
> ...
> As it was, there is no 2.5 / i386 port of KGDB as far as I know;

I have kgdb for every kernel back to 2.4.0-something. Have a
fish around in http://www.zip.com.au/~akpm/linux/patches/

> ...
> I've always thought it would be useful. Sure, everyone debugs
> differently; but a number of people seem to agree with me that KGDB is
> convenient.
>

I suspect the example which you give is not a very typical one. Generally
people use kgdb for poking around looking at kernel state. I almost never
single-step. I set breakpoints so that I can inspect state within a
particular context, and for coverage testing ("is this path being executed").

Also as a replacement for printk/rebuild/reboot.

Also for inspecting ad-hoc instrumentation: just add `some_global_int++;'
and then take a look at its value - much quicker than exposing it via /proc.

It's also very good to have kgdb on hand when you happen to hit a
really rare bug - I hit a weirdo request queue corruption thing the
other day, an hour into a `dbench 1024' run. Was able to get a
decent amount of information. Heaven knows how long it would take
to make that bug trigger a second time...
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/