Slashdot Log In
Debugging the FreeBSD Kernel Transparently
Posted by
kdawson
on Sun Mar 11, 2007 07:33 PM
from the deep-juju dept.
from the deep-juju dept.
An anonymous reader writes "To debug the FreeBSD kernel core dump efficiently, it is best to set up a remote debugging session between a development machine and the target machine, and remotely debug the kernel using serial communication. This article shows you how you can debug as many kernel images as you want; it becomes transparent to users once debugging starts, and your system's performance is not affected at all."
This discussion has been archived.
No new comments can be posted.
Debugging the FreeBSD Kernel Transparently
|
Log In/Create an Account
| Top
| 55 comments
| Search Discussion
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Surely... (Score:5, Funny)
I was just about to post this story.... (Score:3, Informative)
However, I have a question that perhaps others can answer.
What does the diagram actually work out?
Listing 1. 25-Pin NULL modem cabling
2 3 Transmit Data
3 2 Receive Data
4 5 Request to Send
5 4 Clear to Send
6 20 Data Set Ready and Carrier Detect
7 7 Signal Ground
20 6 Data Terminal Ready
What does that mean? I thought serial -> serial is merely a connection. Do I have to solder something?
Regards
Re:I was just about to post this story.... (Score:4, Informative)
(http://www.ampmouse.com/)
gdb remote is useful (Score:3, Interesting)
Also, gdb remote is often used to talk to a server that mimics a gdb remote stub and then turns the commands into some other connection into the target (eg. a JTAG debugger).
All up, this makes debugging embedded systems a lot simpler than it would otherwise be.
Stop pissing about (Score:3, Interesting)
(http://www.milksucks.com/ | Last Journal: Monday September 15 2003, @12:30PM)
debugging kernels (Score:3, Funny)
Unfortunately (Score:3, Funny)
Wyse terminals work well for this. (Score:3, Interesting)
I also used the same terminal and SoftIce to *ahem* "debug" several windows applications.
Wyse terminals (at least the older ones) are excellent gear, very sturdy, nice keyboards, though the monochrome monitor was a bit burnt in on the one I used. An industrial strength terminal for a rock solid OS. A match made in heaven. FreeBSD is an excellent OS.
Transparent to users? (Score:2)
(Last Journal: Thursday April 18 2002, @07:50PM)
Something tells me that if the kernel has dumped core and dropped down into a debugger, the users are going to notice something. Just a hunch.
It was a dark day for Linux (Score:2, Interesting)
It was a dark day for Linux when Linus said he didn't believe in kernel debuggers.
Last time I had a good look at what was on offer while developing a filesystem for multiple operating systems, I compared the tools for Linux to Windows, MacOSX, IRIX and Solaris.
Windows was clearly the best for remote kernel debugging with windbg and I don't see that changing anytime soon. A fully fledged debugger, automatic download of kernel symbols from Microsoft and your own repository, reliable capture of dumps etc. That and the API documentation made the black box nature of the O/S a much smaller issue than the open source community would like us to believe. I was always so much more confident if we had a crash due to our software at a customer site that with Windows we had the best chance of capturing and hopefully identifying the problem.
For live debugging IRIX was the best with icrash. Its port to Linux, lcrash, was not as good and reliable at the time, maybe its better now but the lack of symbol files it need on Linux always made it frustrating. And now IRIX is dead.
I've heard some really good things about dtrace, so Solaris and Mac look to have the best live debugging and tracing tool there is today...I see some progress on Linux ports [sun.com] which is great to see.
But when it comes to kernel debugging on Linux, the picture is still bleak.
quantum (Score:1)
Re:Who cares? (Score:1)
Re:DDB (Score:2)
(Last Journal: Friday October 08 2004, @04:53AM)
Eivind.