Svante Signell, le Tue 10 May 2011 14:00:07 +0200, a écrit : > On Tue, 2011-05-10 at 13:34 +0200, Samuel Thibault wrote: > > > > > > > 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. > > Well objdump gave a lot of hits for mach_port_deallocate but > mach_port_deallocate_debug was not found. And the addresses are > different from the hex editor. Anyway using objdump -D I found it: > > 002c10c0 <mach_port_deallocate_debug>: > 2c10c0: 00 00 add %al,(%eax)
But that's not a file offset. Actually I meant objdump -x, to get the headers, which tell you know virtual addresses relate with file offsets. > > > 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. > > Partly understood, does this command apply to the -dbg version of > gnumach in the running kernel? Yes. The non-dbg version doesn't have the debugger at all. Samuel