Re: Breakpoint Implementation
Re: Breakpoint Implementation
- Subject: Re: Breakpoint Implementation
- From: Dave Keck <email@hidden>
- Date: Thu, 7 Oct 2010 03:58:52 -0400
> Alternately, you could use hardware breakpoints; see the gdb sources for details.
I'll have to add support for those too. Looking at the GDB sources it
looks like it might be simpler than the INT3-replacement technique
too.
> The typical way gdb deals with this is by being privileged due to code signing with regard to taskgated, such that taskgated permits it to do a task_for_pid() call on the process, get the task port, and handle the event as a Mach exception, rather than trying to handle it as a signal. This assumes it's either running under the same credential as the target process, or is running as a privileged used (e.g. via sudo).
I should have mentioned that the breakpoint functionality is built on
Mach exceptions as you explain. It seems to work fine, but I must
admit that I'm confused by your mentioning of Dtrace and recompiling
the kernel to implement my own trap handler. Does that still apply
with breakpoints implemented using INT3-replacement and Mach
exceptions?
Thanks,
David
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden