signal.h中是如下定义的:
#include <machine/signal.h>/* sigcontext; codes for SIGILL, SIGFPE */
#defineSIGHUP 1/* hangup */
#defineSIGINT 2/* interrupt */
#defineSIGQUIT 3/* quit */
#defineSIGILL 4/* illegal instruction (not reset when caught) */
#defineSIGTRAP 5/* trace trap (not reset when caught) */
#defineSIGABRT 6/* abort() */
#if (defined(_POSIX_C_SOURCE) && !defined(_DARWIN_C_SOURCE))
#defineSIGPOLL 7/* pollable event ([XSR] generated, not supported) */
#else/* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
#defineSIGIOT SIGABRT/* compatibility */
#defineSIGEMT 7/* EMT instruction */
#endif/* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */
#defineSIGFPE 8/* floating point exception */
#defineSIGKILL 9/* kill (cannot be caught or ignored) */
#defineSIGBUS 10/* bus error */
#defineSIGSEGV 11/* segmentation violation */
#defineSIGSYS 12/* bad argument to system call */
#defineSIGPIPE 13/* write on a pipe with no one to read it */
#defineSIGALRM 14/* alarm clock */
#defineSIGTERM 15/* software termination signal from kill */
#defineSIGURG 16/* urgent condition on IO channel */
#defineSIGSTOP 17/* sendable stop signal not from tty */
#defineSIGTSTP 18/* stop signal from tty */
#defineSIGCONT 19/* continue a stopped process */
#defineSIGCHLD 20/* to parent on child stop or exit */
#defineSIGTTIN 21/* to readers pgrp upon background tty read */
#defineSIGTTOU 22/* like TTIN for output if (tp->t_local<OSTOP) */
#if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
#defineSIGIO 23/* input/output possible signal */
#endif
#defineSIGXCPU 24/* exceeded CPU time limit */
#defineSIGXFSZ 25/* exceeded file size limit */
#defineSIGVTALRM 26 /* virtual time alarm */
#defineSIGPROF 27/* profiling time alarm */
#if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE))
#define SIGWINCH 28/* window size changes */
#define SIGINFO29 /* information request */
#endif
#define SIGUSR1 30/* user defined signal 1 */
#define SIGUSR2 31/* user defined signal 2 */
Exception codes
In the crash log is a line that starts with the text Exception Codes:
followed by one or more hexadecimal values. These are processor-specific codes that may give you more information on the nature of the crash.
-
The exception code
0xbaaaaaad
indicates that the log is a stackshot of the entire system, not a crash report. To take a stackshot, push the home button and any volume button. Often these logs are accidentally created by users, and do not indicate an error. -
The exception code
0xbad22222
indicates that a VoIP application has been terminated by iOS because it resumed too frequently. -
The exception code
0x8badf00d
indicates that an application has been terminated by iOS because a watchdog timeout occurred. The application took too long to launch, terminate, or respond to system events. One common cause of this is doing synchronous networking on the main thread. Whatever operation is onThread 0:
needs to be moved to a background thread, or processed differently, so that it does not block the main thread. -
The exception code
0xc00010ff
indicates the app was killed by the operating system in response to a thermal event. This may be due to an issue with the particular device that this crash occurred on, or the environment it was operated in. For tips on making your app run more efficiently, see iOS Performance and Power Optimization with Instruments WWDC session. -
The exception code
0xdead10cc
indicates that an application has been terminated by iOS because it held on to a system resource (like the address book database) while running in the background. -
The exception code
0xdeadfa11
indicated that an application has been force quit by the user. Force quits occur when the user first holds down the On/Off button until "slide to power off" appears, then holds down the Home button. It's reasonable to assume that the user has done this because the application has become unresponsive, but it's not guaranteed - force quit will work on any application.