Svante Signell, le Tue 10 May 2011 12:31:16 +0200, a écrit : > On Mon, 2011-05-09 at 18:43 +0200, Samuel Thibault wrote: > > > > Single stepping in msgserver.c also triggered the console printout: task > > > 5040ee18 deallocating an invalid port 340/xxx, most probably a bug. > > > > Note that you can make the kernel start the in-kernel debugger in that > > case. Simply set the mach_port_deallocate_debug variable to 1, or use nm > > on the "gnumach" binary to get its adress, e.g. 0x20001234, and use > > > > w 20001234 1 > > cont > > > > from the kernel debugger (use ctrl-alt-d to invoke it) to write a 1 > > there. > > It's not so simple as you say: I have now found out where the > mach_port_deallocate_debug variable is in gnumach-1.3.99-486-dbg (copied > from boot and uncompressed). I have two alternatives: > > 1) Write a one into that address without using the kernel debugger, how?
That's an option. Use objdump -d gnumach-1.3.99-486-dbg to determine the file offset of the variable, and use a hex editor. It's really not the simplest way. > 2) Uncompress it at /boot > Start the debugger with C-A-d. Does this work on an uncompressed image? > w 002c10c0 1 > cont There's a misunderstanding: w writes in the living kernel and has immediate non-permanent effect, not in /boot. > and then, how to exit the debugger? That's what cont is for. > When should I start the kernel debuggger, before or after triggering: > 5040ee18 deallocating an invalid port 340, most probably a bug. Before. > Is there any help available for the kernel debugger? There are documentations on the net, the debugger is BSD's ddb. Samuel