site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com -- Terry _______________________________________________ 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... On Sep 7, 2007, at 12:43 AM, Jonas Maebe wrote: On 07 Sep 2007, at 01:19, Terry Lambert wrote: A signal starts as a Mach exception, which can be intercepted and averted, if you hold the exception port for the process and know what you are doing. For example, gdb only partially knows what it's doing; if you don't turn off "start-with-subshell", which is on by default, for example, gdb wil hold the exception port on the subshell rather than the process being debugged, and you will not be able to override signals, since you will only see them in gdb via ptrace, rather than as a Mach exception. Does this mean that this could be used somehow as a workaround to debug unix signals in gdb? Yes. It is how you debug programs with issues around their signal handling, or signals in general. Or is there any other workaround besides "sleep inside your signal handler and attach with gdb only after the signal has been triggered"? Not that I know of; on a standard BSD system, ptrace could let you do this, but Mach semantics are expected by gdb on Mac OS X. This email sent to site_archiver@lists.apple.com