Re: remote debugging with gdb on 10.6.2
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=/f+3oYCNa04FwjsbNY7OsU60Ifx8pzF8nbnP0h3S+as=; b=McX+3IRGl0g+fal0+58+a4HonvIz2MH4lpe3R0qF5zxuddKk8F8DDes+BBgZMjpqkw 7BApnP7TKqieWpU6hk+0j7mBecZCoWv6+IB5p693bq7ub6vmybhDRhiIJldeY6gwWX6b WuEI5Bg/6LBGFBYld/HGrVbT4XtFLuzlR0wys= 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=rHCst6IMl47XZSinfK3OdYOe3MYgn9GPpwbz1ljyDtF7DOXciTEbpLq22YqwKmmFNb VXeddZlB6LI35NLTCrrWz99DLgD3nWo6RZ6ij1umm/EPi3k9pqJhOZx72S9nq+T69AQU 1p/ZBkMpG99HbBbGLcMXk58iHImW3PNX1gbOc= On Mon, Nov 23, 2009 at 10:19 PM, mogambo <mogambo13@gmail.com> wrote:
Thanks, Brian. I made some progress, but I am still having problems. I tried boot-args 0x144 (although with boot-args 0xd44 I did have _panicd_ip set as welll). The most important I was misisng was NMI the machine with power button. I had used remote debugging with freebsd in my previous job. I don't remember having to do anything special like that. I am debugging a file system driver, which I am able to load successfully. I created symbols at kextload time and copied to the debugger machine earlier. I used -arch x86_64 as the debugger and debugee are both running 64-bit 10.6. I was able to connect to the debugee in the gdb. With add-symbol-file, I added the kext symbols, but get warnings: Reading symbols from /path/to/com.company.kext.fsd.sym... warning: .o file "/path/to/object.o" more recent than executable timestamp in "/path/to/com.company.kext.fsd.sym warning: Could not open OSO file /path/to/object.o to scan for pubtypes for objfile /path/to/com.company.kext.fsd.sym : done. I was able to set a breakpoint in my kext and apparently hit it too as expected. However, I cannot single-step through the kext code - I get an error saying something like "no symbol information for this line was found; continuing to the end of the function". At the point where I hit the trap fault, I am unable print any arguments to the function, or locals. I am sure what I intend to do is not an uncommon use of remote debugging. What am I doing wrong?
Are you following the guidelines at <http://developer.apple.com/mac/library/documentation/DeviceDrivers/Conceptual/WritingDeviceDriver/DebuggingDrivers/DebuggingDrivers.html> ? In Leopard and later, kextutil was split into two parts. You want to do the following: { build your kext } cd build/Development { in here you would have the kext and kext.dSYM bundles } kextutil -z -n -s . -- ./fsd.kext { it will prompt you for the kext load address. You can get that from "showallkmods" in gdb } inside gdb, use add-kext (gdb) add-kext ./fsd.kext This should give you source lines and locals if you compiled & linked everything correctly. 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
participants (1)
-
Brian Bechtel