4 ms·
"I happen to believe that not having a kernel debugger forces people to think about their problem on a different level than with a debugger. I think that withou
by thras 17y ago
"I happen to believe that not having a kernel debugger forces people to think about their problem on a different level than with a debugger. I think that without a debugger, you don't get into that mindset where you
know how it behaves, and then you fix it from there. Without a debugger, you tend to think about problems another way. You want to understand things on a different _level_."
This seems to be the most worthwhile part of the post. I've never gotten into the habit of using debuggers myself, so I can't say how strong his argument is.
- Deestan 17y agoI also find that a debugger encourages a technique of just tracing through the code until "a-hah, that's where fooBing get reset to dingy. I should add a clause to reset it to dingy only if barBong is set." Without a debugger, I would have to write tests, clean up the code until it made sense, or design it in such a way that that particular kind of bug could not occur.
- antonovka 17y agoI also find that a debugger encourages a technique of just tracing through the code until "a-hah, that's where fooBing get reset to dingy. I should add a clause to reset it to dingy only if barBong is set." Someone actually skilled in their craft would say: "a-hah, that's where fooBing get reset to dingy. now I understand what's happening, let's understand why". Remember, this is kernel code we're talking about here. In user-space, I rarely need to use a debugger because nearly all issues are caught during initial development by unit and regression testing. However, there are still times where something goes terribly wrong -- sometimes in vendor code (or in the case of the kernel, hardware) -- and I wouldn't give up my debugger for the world.
- Deestan 17y agoNo disagreement that debuggers are helpful, but they allow unskilled people to do more crap work without having to learn or think or improve, and that is what I believe Linus is going on about. By all means, I don't agree with him that debuggers should be forbidden, but I believe I know where he's coming from.
- antonovka 17y agoSometimes a debugger is simply the fastest route to isolating and solving an issue. I recently had to track down a kernel issue caused by an piece of code unrelated to my current work casting a signed value to unsigned and eventually triggering a kernel panic. Thanks to remote kernel debugging, I could simply step through the code path and track the changes. If I accidentally overstepped the failure point, I just reset the virtual machine back to the snapshot point and reattached the debugger. Did this mean that I didn't know how the code behaved? No -- I had to understand the code, but there was very little chance that I would quickly eyeball a single incorrect cast in a comparison 6 degrees of separation from where my own code was being run without being able to trace the issue a couple times in a debugger as it happened.