• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: EVFILT_SIGNAL - observe "standard" signals before they are delivered?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EVFILT_SIGNAL - observe "standard" signals before they are delivered?


  • Subject: Re: EVFILT_SIGNAL - observe "standard" signals before they are delivered?
  • From: Terry Lambert <email@hidden>
  • Date: Fri, 7 Sep 2007 03:09:29 -0700

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.


-- Terry
_______________________________________________
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


References: 
 >EVFILT_SIGNAL - observe "standard" signals before they are delivered? (From: Jim Correia <email@hidden>)
 >Re: EVFILT_SIGNAL - observe "standard" signals before they are delivered? (From: Terry Lambert <email@hidden>)
 >Re: EVFILT_SIGNAL - observe "standard" signals before they are delivered? (From: Jonas Maebe <email@hidden>)

  • Prev by Date: Re: EVFILT_SIGNAL - observe "standard" signals before they are delivered?
  • Next by Date: Re: Volume header needs minor repair
  • Previous by thread: Re: EVFILT_SIGNAL - observe "standard" signals before they are delivered?
  • Next by thread: Re: Volume header needs minor repair
  • Index(es):
    • Date
    • Thread