Re: Attaching to /dev/kmem with gdb
Re: Attaching to /dev/kmem with gdb
- Subject: Re: Attaching to /dev/kmem with gdb
- From: Andrew Gallatin <email@hidden>
- Date: Fri, 4 Apr 2003 08:24:05 -0500 (EST)
Paul Ripke writes:
>
> gdb -s /mach.sym /dev/kmem
>
>
>
> Now I know you can't attach directly to a running kernel as you would
>
> a program, since halting the kernel would halt you. But, from what I
>
> understand you can attach to the running image to examine the memory,
>
> without halting that image. Perhaps I am mistaken?
>
>
I'm led to believe that this is not supported with the Mac OS X gdb. It
>
would be nice - I find it handy on NetBSD, AIX and Tru-64.
>
And FreeBSD, and Solaris, and.. well.. pretty much every other unix
under the sun. In OS-X's favor, it probably has the best remote
debugging facility around. You can do what you want by breaking
into the debugger and attaching a remote gdb over the network.
And when you do this, you get a consistant view of the world, because
the kernel is halted.
My OS-X debugging wishlist would be:
- symbolic stack traces on kernel panics. This requires a little
magic from the kernel linker, but hey, if FreeBSD, Solaris, AIX, etc
can do it, OS-X should be able to do it too. It would be really nice,
if a customer reported a panic, to be able to see where it happened.
- local attachment via gdb -k to /dev/kmem.
- crashdumps.
Since its open-source, I suppose people are free to implement these
things...
Drew
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.