Debugging the FreeBSD Kernel Transparently 55
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."
Surely... (Score:5, Funny)
Re: (Score:1, Interesting)
Please, enlighten me as to how something can be "1, Redundant" if it's the first post?
Re: (Score:2)
Re: (Score:1)
I think people will see through this transparent debugging process for what it really is... A thinly veiled attempt to strip the code naked, make the kernel look sexy, and get something posted on slashdot!
Re: (Score:2)
Re: (Score:1)
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)
Re: (Score:2, Informative)
Re: (Score:2)
You were going to submit the article without RTFA? From the article, comes this link [nullmodem.com], which explains things rather well (IMHO).
Do I have to solder something?
No, you should be able to buy a null modem cable.
Re: (Score:2, Funny)
You must be in the wrong place here. A true Slashdot user would ask: "Please, can I solder something to make this work?"
Re: I was just about to post this story.... (Score:3, Interesting)
You seem to think in strange ways. Indeed, serial -> serial is a connection, but surely, you realize that you have to make that connection with something, or did you think it was wireless?
Either way, to actually answer the question, you don't actually have to solder anything -- you should be able to buy a null modem cable anywhere. However, considering this is Slashdot, don't you think it would be easier to solder it y
Computers these days (Score:2)
Laptops almost never have serial or parallel connectors.
But, you are correct, 25-pin serial is rather rare...
Re: (Score:1)
Re: (Score:1)
Re: (Score:1)
Re: (Score:2)
rx
gnd
ftw
Re: (Score:1)
you can either cut a straight through cable and resolder, buy the db9 or db25 ends and make your own cable (can be soldered, or solderless), or just go buy a null modem cable.
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)
debugging kernels (Score:3, Funny)
Re: (Score:1)
Unfortunately (Score:3, Funny)
Which system? (Score:1)
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.
Re: (Score:1)
Transparent to users? (Score:2)
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.
Re: (Score:2)
At any rate, FreeBSD provides a mechanism for allowing core dumps of the kernel to happen whenever you (ie someone who's authorized) w
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.
Re: (Score:2)
I recently was customizing for myself frame buffer driver. I have overhauled about 20k of kernel code - and after several compilation errors it worked perfectly fine. As in "just works."
On Linux side I can tell only one thing: if you need a debugger for kernel, then you are better off doing your stuff in user space. 2.6 is heck a lot cleaner and polished than any linux kernel I have worked before - 2.0/2.1/2.2/2.4. Most stuff
Re: (Score:2)
Yeah, it's too bad Linus doesn't believe in microkernels either. This is the same guy who thought the OOM killer was a great idea.
Re: (Score:2)
Eivind.
quantum (Score:1)
Re: (Score:2)