Re: Debuggin XNU build
Re: Debuggin XNU build
- Subject: Re: Debuggin XNU build
- From: Regis Duchesne <email@hidden>
- Date: Tue, 21 Apr 2015 12:43:51 +0000
- Thread-topic: Debuggin XNU build
> one more question (though different ) is that - Is there any kernel variable that we can toggle on the target using sysctl to trigger a break into the debugger. Or if there is any key-combination that would do that. This is when kernel debugger connection is fine, and I let the target to boot completely, then I want to break in. Assume I don’t have any component running where I can set BP before letting the target go on running.
I can think of two ways to do this:
1) Use nvram to add flag 0x1 to debug= in boot-args.
DB_HALT
0x01
Halt at boot-time and wait for debugger attach (gdb).
Then after the OS X guest boots, it will wait for your debugger to connect. Then just run "c" (continue) and your guest will run normally until it either hits a breakpoint, or you hit Ctrl-C at the gdb prompt.
2) Write a trivial kernel module which simply calls Debugger(<some string>); in its start method. Then load that module in the guest every time you need to drop to the debugger.
Cheers,
--
hpreg
_______________________________________________
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