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: James Shimer <email@hidden>
- Date: Wed, 25 Nov 2009 16:26:51 -0500
I suggest using the logging functionality to spew debug to the
console. Like I said before there are hard tools that are used for
situations such as this, you can't just stop scheduling and expect the
ethernet/debugging processing to keep going.
On Nov 25, 2009, at 3:24 PM, mogambo wrote:
Hi Brian,
This was very helpful. I can now single-step and see locals in my
remote debugging session. This is what I do:
1. Build the kernel extension on the debugger machine.
2. Build the kernel extension on the taget machine.
3. Load the kext on the target.
4. start gdb session on the debugger: gdb -arch x86_64 /Volumes/
KernelDebugKit/mach_kernel.
5. source /Volumes/KernelDebugKit/kgmacros.
6. target remote-kdp
7. attach <target_ip> and trigger NMI on the debugee.
8. Once the gdb connects, showallkmods and get the load address of
the kext.
9. On the debugger, go to the kext build directory and run the
following command. Provide the load address from step 8 when asked
for it.
kextutil -z -n -s . -- fsd.kext
10. Back to the gdb session: add-kext
<path_to_kext_build_directory> Gdb finds the symbols file created
in step 9 and loads it.
11. Set my breakpoints and hit continue.
Now, I hit the problem that's talked about already on the forum,
where the target machine locks when single stepping.
Thanks again for your help.
_______________________________________________
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
_______________________________________________
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