• 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: Why no crash reporter if I install some signal handler on Leopard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why no crash reporter if I install some signal handler on Leopard


  • Subject: Re: Why no crash reporter if I install some signal handler on Leopard
  • From: zhanglin <email@hidden>
  • Date: Wed, 28 Nov 2007 14:34:27 +0800

Thanks, all.
I change to install an exception handler rather signal handler with api InstallExceptionHandler(),
and in my exception handler, I firstly invoke some other tool to collect information, and then return -1, so the crash report dialog will be shown. But it still exist a problem: does the InstallExceptionHandler only affect the current thread? If I crash in other thread, will my exception handler be invoked?


On Nov 28, 2007, at 9:23 AM, Terry Lambert wrote:

On Nov 27, 2007, at 4:36 PM, Jim Magee wrote:
On Nov 27, 2007, at 5:42 PM, Terry Lambert wrote:
The following will work, but it's not ideal:

=======
#include <signal.h>
#include <stdio.h>

void sig_abort(int sig)
{
     printf("Application has been abort\n");
     abort();
}

...
It's not ideal because you can't really rethrow the abort with the same stack, you will always show as being in the trap handler (the stack for a crash report looks something like this (on a PPC):

It's also not ideal because printf() is not signal-handler-safe. ;-)

Very true.

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

_______________________________________________ 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: 
 >Why no crash reporter if I install some signal handler on Leopard (From: zhanglin <email@hidden>)
 >Re: Why no crash reporter if I install some signal handler on Leopard (From: Terry Lambert <email@hidden>)
 >Re: Why no crash reporter if I install some signal handler on Leopard (From: Steve Sisak <email@hidden>)
 >Re: Why no crash reporter if I install some signal handler on Leopard (From: Terry Lambert <email@hidden>)
 >Re: Why no crash reporter if I install some signal handler on Leopard (From: Jim Magee <email@hidden>)
 >Re: Why no crash reporter if I install some signal handler on Leopard (From: Terry Lambert <email@hidden>)

  • Prev by Date: Re: Why no crash reporter if I install some signal handler on Leopard
  • Next by Date: Re: Resident Memory, Private Memory, Shared Memory (top, Activity Monitor and vmmap)
  • Previous by thread: Re: Why no crash reporter if I install some signal handler on Leopard
  • Next by thread: Lowering Thread Priority
  • Index(es):
    • Date
    • Thread