4 ms·
That reminds me about that one day in at Sun back in the late 90's when I compiled Solaris in debug mode and set up KGDB. I was running a full Solaris kernel w
by lokedhs 7y ago
That reminds me about that one day in at Sun back in the late 90's when I compiled Solaris in debug mode and set up KGDB.
I was running a full Solaris kernel while anothe rmachine was running GDB and DDD. I was able to visualise all the kernel structures in realtime. It was significantly more usable that I would have imagined it to be.
Can you do something similar these days with Linux?
- agapon 7y agoOf course.
- mistrial9 7y agocurious - the Sun developers I saw in the late 90s had a multi-window debugger but the local variables Did Not Update, and had to be 'refreshed' manually; at the same time, I had MetrwoWerks IDE Debugger on a Macintosh, and easily had all locals, source code, stack, RAM inspection by structure and more, all updating with every change. The Sun devs were being PAID a LOT more, yet their tools looked primitive and the contextual knowledge to use them was much greater..
- lokedhs 7y agoI'm not sure. I wasn't working as a kernel developer. I did have to debug stuff though to find bugs or explain certain behaviours. I guess one reason it wasn't used much is because it was a hassle to set up, and I think it got a bit slow when you had a lot of information displayed. I do recall not using this setup much in practice, as just breaking into the debugger on the machine itself was faster and easier. You had to lot of options when it came to working on the Solaris kernel, and the code was so easy to understand. In fact, I believe the Solaris code base is the best C code I've ever worked with. It's a pity what happened after Oracle took over.
- pjmlp 7y agoExactly my kind of experience learning UNIX, while coming from Amiga/PC/Mac IDE world, back in those days.
- ktm5j 7y agoYou could, but eBPF might be a more sensible way to get the same information: http://www.brendangregg.com/ebpf.html http://www.brendangregg.com/ebpf.html
- cryptonector 7y agoThat's comparable to DTrace. The Solaris kernel debugger, kmdb, is something else, and really worth knowing (if only it was universally adopted by C-coded kernels!). With kmdb you get to write shell-like pipelines using powerful data structure traversal builtins, and it is safe (you can't crash the system by dereferencing NULL pointers). Really, it's quite fantastic.
- monocasa 7y agoYeah, kgdb has been mainlined for a while. In Windows land, windbg has supported this setup for forevers too.