site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Sa/FsMOjCHbKEeV8KQzPDS81e6MCBZOpR7Yr9u5OB3I=; b=esDkBCQYVoxUEwLpeWeJfWUQZwV5+kqop4BJKhtLP1ImiKVlt9voTaujlDf88CK5T+ K5UAaelmH8cY2mImKszc/IjP+RQRlLvUsBtdg1IqSSIklYNr5pk+hqAhdeZZiYBm2MFr jx5a8QFF6amX29HasV3Ecw04Yom0IzvhSHfu8= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=a9tgN9oZBTONO84+v6tPLSUDMflGf2nQxah8xAeQ7dV2YU7W9d9L6gE8sY1lqyWaRl I/4t4bee8XwBHFVfc9RxhJyv6OFuMPiLGBgXvIORe27qHpVYQTrBAFixpy5O23NBgkZ7 +VxwdSpCU+RPmElO1cEwEZk/YddHtbU/bObmc= On Fri, Nov 20, 2009 at 1:06 PM, mogambo <mogambo13@gmail.com> wrote:
Hi, I want to do remote debugging on 10.6.2 system. I found the following link about remote kernel debugging. I tried using the default kernel, rather than building my own and use mach_kernel in the debug kit.
You should use the Kernel Debug Kit, found at developer.apple.com/sdk. Mount the disk image Apple provides, then issue the command gdb -arch i386 /Volumes/KernelDebugKit/mach_kernel inside gdb, issue the command source /Volumes/KernelDebugKit/kgmacros
However, when I issue attach <ip> command in the gdb, remote_connect keeps timing out. The boot-args on the target contains debug=0xd44.
It should be debug=0x144, rather than debug=0xd44. The additional bits you've set are defined in technote 2118, "Kernel Core Dumps" at http://developer.apple.com/mac/library/technotes/tn2004/tn2118.html setting DB_KERN_DUMP_ON_PANIC means that you'll attempt to send a core to the IP address in the boot-args argument _panicd_ip. Since you probably haven't set that, you're probably confusing things. The quick summary of 2 machine debugging is: For ethernet connections, on the panicking machine: % sudo nvram boot-args="debug=0x144" reboot to let this new setting take affect. Panic the machine, or NMI the machine by pressing the power key. On the host machine, download the Kernel Debug Kit from http://developer.apple.com/sdk, or use the search function on developer.apple.com to find the appropriate Kernel Debug Kit which matches the operating system version on the panicking machine. Mount the Kernel Debug Kit image to create /Volumes/KernelDebugKit % gdb -arch i386 /Volumes/KernelDebugKit/mach_kernel (gdb) source /Volumes/KernelDebugKit/kgmacros (gdb) kdp-reattach {ip address or name of panicking machine} For firewire connections in Leopard or later, on the panicking machine: % sudo nvram boot-args="debug=0x144 kdp_match_name=firewire" reboot to let this new setting take affect. Panic the machine, or NMI the machine by pressing the power key. On the host machine, download the Kernel Debug Kit from http://developer.apple.com/sdk, or use the search function on developer.apple.com to find the appropriate Kernel Debug Kit which matches the operating system version on the panicking machine. Mount the Kernel Debug Kit image to create /Volumes/KernelDebugKit In a terminal window, invoke fwkdp % fwkdp Leave that window open, and in another window, load gdb % gdb -arch i386 /Volumes/KernelDebugKit/mach_kernel (gdb) source /Volumes/KernelDebugKit/kgmacros (gdb) kdp-reattach localhost fwkdp redirects your gdb session so that gdb acts as if the host machine was panicked. It isn't, of course, but the fwkdp session gives you access to everything on the panicking machine. Good luck _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com