Messages in this thread |  | | Subject | Re: [linux-usb-devel] Re: [BK PATCH] USB changes for 2.5.34 | From | Alan Cox <> | Date | 16 Sep 2002 02:23:23 +0100 |
| |
On Mon, 2002-09-16 at 00:24, Larry McVoy wrote: > My position is that you either understand the code or you don't. Code > that you don't understand is read only. Having a debugger show you some > variables isn't going to make you understand the code at the level which > is required in order to be making changes.
It isnt about understanding the code. You issue a perfectly valid command to your scsi driver. Your ethernet crashes. All your code is perfect.
Thats a real scenario. In fact thats a horribly common scenario, and the kind of thing I have to deal with every day of the week because I debug driver code.
Understanding your own code by using a debugger (or printk) to see what is does is not good practice. Understanding misdocumented or crap code often needs a debugger to see what is going on, and to be able to understand how to fix it. The moment you hit the hardware layer the fun really begins, and you need the debugger, not to understand your code flow but to snoop around the machine to see what the device did or didn't do.
- 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/
|  |