Re: remote debugging with gdb on 10.6.2
Re: remote debugging with gdb on 10.6.2
- Subject: Re: remote debugging with gdb on 10.6.2
- From: Brian Bechtel <email@hidden>
- Date: Tue, 24 Nov 2009 17:10:21 -0800
On Mon, Nov 23, 2009 at 10:19 PM, mogambo <email@hidden> 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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden