OLD | NEW |
1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 27 matching lines...) Expand all Loading... |
38 Information about the exception will be appended to 'FILE' instead of the | 38 Information about the exception will be appended to 'FILE' instead of the |
39 standard output stream. | 39 standard output stream. |
40 | 40 |
41 *-m*, *--mach-service*='SERVICE':: | 41 *-m*, *--mach-service*='SERVICE':: |
42 Check in with the bootstrap server under the name 'SERVICE'. This service name | 42 Check in with the bootstrap server under the name 'SERVICE'. This service name |
43 may already be reserved with the bootstrap server in cases where this tool is | 43 may already be reserved with the bootstrap server in cases where this tool is |
44 started by launchd(8) as a result of a message being sent to a service declared | 44 started by launchd(8) as a result of a message being sent to a service declared |
45 in a job’s +MachServices+ dictionary (see launchd.plist(5)). The service name | 45 in a job’s +MachServices+ dictionary (see launchd.plist(5)). The service name |
46 may also be completely unknown to the system. | 46 may also be completely unknown to the system. |
47 | 47 |
48 *-n*, *--nonblocking*:: | |
49 Don’t wait for an exception to occur if one is not received immediately. In | |
50 nonblocking mode, this tool exits immediately if no exception is received. The | |
51 default mode is blocking. | |
52 | |
53 *-p*, *--persistent*:: | 48 *-p*, *--persistent*:: |
54 Continue processing exceptions after the first one. The default mode is | 49 Continue processing exceptions after the first one. The default mode is |
55 one-shot, where this tool exits after processing the first exception. | 50 one-shot, where this tool exits after processing the first exception. |
56 | 51 |
57 *-t*, *--timeout*='TIMEOUT':: | 52 *-t*, *--timeout*='TIMEOUT':: |
58 Run for a maximum of 'TIMEOUT' seconds. This option only has an effect in | 53 Run for a maximum of 'TIMEOUT' seconds. Specify +0+ to request non-blocking |
59 blocking mode (when *--nonblocking* is not specified). In *--persistent* mode, | 54 operation, in which the tool exits immediately if no exception is received. In |
60 'TIMEOUT' applies to the overall duration that this tool will run, not to the | 55 *--persistent* mode, 'TIMEOUT' applies to the overall duration that this tool |
61 processing of individual exceptions. | 56 will run, not to the processing of individual exceptions. When *--timeout* is |
| 57 not specified, this tool will block indefinitely while waiting for an exception. |
62 | 58 |
63 *--help*:: | 59 *--help*:: |
64 Display help and exit. | 60 Display help and exit. |
65 | 61 |
66 *--version*:: | 62 *--version*:: |
67 Output version information and exit. | 63 Output version information and exit. |
68 | 64 |
69 == Examples | 65 == Examples |
70 | 66 |
71 Run a one-shot blocking exception server registered with the bootstrap server | 67 Run a one-shot blocking exception server registered with the bootstrap server |
(...skipping 13 matching lines...) Expand all Loading... |
85 signal SIGILL | 81 signal SIGILL |
86 ---- | 82 ---- |
87 | 83 |
88 Run an on-demand exception server started by launchd(5) available via the | 84 Run an on-demand exception server started by launchd(5) available via the |
89 bootstrap server under the name +svc+: | 85 bootstrap server under the name +svc+: |
90 [subs="quotes"] | 86 [subs="quotes"] |
91 ---- | 87 ---- |
92 $ *on_demand_service_tool --load --label=catch_exception \ | 88 $ *on_demand_service_tool --load --label=catch_exception \ |
93 --mach-service=svc \ | 89 --mach-service=svc \ |
94 $(which catch_exception_tool) --mach-service=svc \ | 90 $(which catch_exception_tool) --mach-service=svc \ |
95 --file=/tmp/out --nonblocking --persistent* | 91 --file=/tmp/out --persistent --timeout=0* |
96 $ *exception_port_tool --set-handler=handler=bootstrap:svc crasher* | 92 $ *exception_port_tool --set-handler=handler=bootstrap:svc crasher* |
97 Illegal instruction: 4 | 93 Illegal instruction: 4 |
98 $ *on_demand_service_tool --unload --label=catch_exception* | 94 $ *on_demand_service_tool --unload --label=catch_exception* |
99 $ *cat /tmp/out* | 95 $ *cat /tmp/out* |
100 catch_exception_tool: | 96 catch_exception_tool: |
101 behavior EXCEPTION_DEFAULT|MACH_EXCEPTION_CODES, | 97 behavior EXCEPTION_DEFAULT|MACH_EXCEPTION_CODES, |
102 pid 2468, thread 13579, exception EXC_CRASH, codes[2] 0x4200001, 0, | 98 pid 2468, thread 13579, exception EXC_CRASH, codes[2] 0x4200001, 0, |
103 original exception EXC_BAD_INSTRUCTION, original code[0] 1, | 99 original exception EXC_BAD_INSTRUCTION, original code[0] 1, |
104 signal SIGILL | 100 signal SIGILL |
105 ---- | 101 ---- |
106 | 102 |
107 == Exit Status | 103 == Exit Status |
108 | 104 |
109 *0*:: | 105 *0*:: |
110 Success. In *--persistent* mode with a *--timeout* set, it is considered | 106 Success. In *--persistent* mode with a *--timeout* set, it is considered |
111 successful if at least one exception was caught when the timer expires. | 107 successful if at least one exception was caught when the timer expires. |
112 | 108 |
113 *1*:: | 109 *1*:: |
114 Failure, with a message printed to the standard error stream. | 110 Failure, with a message printed to the standard error stream. |
115 | 111 |
116 == See Also | 112 == See Also |
117 | 113 |
118 exception_port_tool(1), | 114 exception_port_tool(1), |
119 on_demand_service_tool(1) | 115 on_demand_service_tool(1) |
120 | 116 |
121 include::man_footer.ad[] | 117 include::man_footer.ad[] |
OLD | NEW |