Re: further help on debugging a hang
Re: further help on debugging a hang
- Subject: Re: further help on debugging a hang
- From: "Brian Bechtel" <email@hidden>
- Date: Tue, 12 Dec 2006 21:30:02 -0800
On 12/12/06, Giuliano Gavazzi <email@hidden> wrote:
What course of action would you take to debug it?
When it hangs, NMI the machine to dump core. This assumes you have
the boot-args set as
sudo nvram boot-args="debug=0xd44"
or equivalent, as documented in Apple's technical note.
Once core is dumped, reboot the machine. You can tell when the
coredump is finshed because you will see the message "waiting for some
to attach" or equivalent. (see support.apple.com and search for "NMI"
to see what the NMI key combinations for your machine are.)
Now that you have the core file, it will be named something like
core-xnu-792-XX.XX.XX.XX-xxxxxxxxxx
where the XX.XX.XX.XX.XX is the IP address of the machine you are
trying to debug, and the other x's are hexadecimal.
Download the kernel debug kit for 10.4.8 from developer.apple.com/sdk.
Open gdb and pass it the "-c" option, using the mach_kernel from
10.4.8 as the other argument.
gdb -c core-xnu-792-XX.XX.XX.XX-xxxxxxxxxx mach_kernel
(gdb) source kgmacros
(gdb) showallstacks
look for stacks which have I/O pending (you should see something
related to the ACARD kext if your theory is correct.)
You can add symbols for the ACARD kext by the following complicated process:
(gdb) showallkmods
find the ACARD kext, look in the second column for the address where
it is loaded.
(I downloaded the latest driver from
http://dl.acard.com/download/mac/ACARD_Driver_1.5.7.pkg.sit) to get
the following information. The driver is com.acard.driver.ACard68xxM
In a different terminal window, enter the command
mkdir ~/Desktop/gg
kextload -a com.apple.iokit.IOPCIFamily@0x123456 -a
com.apple.iokit.IOSCSIFamily@0x234567 -a com.acard.driver.ACard68xxM
-s ~/Desktop/gg -- /path/to/ACard68xxM_driver.kext
this will generate the symbol files. Now in gdb, add them with
(gdb) add-symbol-file ~/Desktop/gg/com.acard.driver.ACard68xxM.sym
and entering "yes" when prompted.
Now, you do the hard part. You debug. You debug. You debug.
Good luck. Remember, all of this is from memory, not from trying it
myself. Your experience may vary.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden