site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=i+FycimjpFTuvBbPJuANKwzVUMmoBuGHQSUewPx0VvY=; b=Q1eUJpoeUuGi3EhKlsLzkhAGPHHr91nX9bgZ2nm5u2KvX3YBWgES5mzkBM4iXOT2TA 8Rbcoll2v84QC8LXrjE3tQZDe8a9CjK5xBUC0OpYZ3qYqm/F4sF1npKoupiUwoFBmJQX hpVZ9ihzEbyoQg2+bDgRlSlBDiZ9WEoYMN3I0= Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=AXABs31nsYavYMb0Tpjgv6P3LkL+9LwyRLVD9vZ/KopOI8Max4/LkM4UMz+/0RFZsx umqls6GX7EoqIk6OnKhyQrKsyutcTSaD1FOFHLwNZHLqKneNk87A6fTAupLTKg6Qdhqd a6amvn/FjrsrVtlNUjpys7nkV0NHBkdSoSgng=
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 (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com