Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(775)

Side by Side Diff: third_party/crashpad/crashpad/tools/mac/catch_exception_tool.ad

Issue 2555353002: Update Crashpad to 32981a3ee9d7c2769fb27afa038fe2e194cfa329 (Closed)
Patch Set: fix readme Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 The Crashpad Authors. All rights reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (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
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 :doctype: manpage
16
17 = catch_exception_tool(1)
18
19 == Name
20
21 catch_exception_tool - Catch Mach exceptions and display information about them
22
23 == Synopsis
24
25 [verse]
26 *catch_exception_tool* *-m* 'SERVICE' ['OPTION…']
27
28 == Description
29
30 Runs a Mach exception server registered with the bootstrap server under the name
31 'SERVICE'. The exception server is capable of receiving exceptions for
32 “behavior” values of +EXCEPTION_DEFAULT+, +EXCEPTION_STATE+, and
33 +EXCEPTION_STATE_IDENTITY+, with or without +MACH_EXCEPTION_CODES+ set.
34
35 == Options
36
37 *-f*, *--file*='FILE'::
38 Information about the exception will be appended to 'FILE' instead of the
39 standard output stream.
40
41 *-m*, *--mach-service*='SERVICE'::
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
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
46 may also be completely unknown to the system.
47
48 *-p*, *--persistent*::
49 Continue processing exceptions after the first one. The default mode is
50 one-shot, where this tool exits after processing the first exception.
51
52 *-t*, *--timeout*='TIMEOUT'::
53 Run for a maximum of 'TIMEOUT' seconds. Specify +0+ to request non-blocking
54 operation, in which the tool exits immediately if no exception is received. In
55 *--persistent* mode, 'TIMEOUT' applies to the overall duration that this tool
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.
58
59 *--help*::
60 Display help and exit.
61
62 *--version*::
63 Output version information and exit.
64
65 == Examples
66
67 Run a one-shot blocking exception server registered with the bootstrap server
68 under the name +svc+:
69 [subs="quotes"]
70 ----
71 $ *catch_exception_tool --mach-service=svc --file=out &*
72 [1] 1233
73 $ *exception_port_tool --set-handler=handler=bootstrap:svc crasher*
74 Illegal instruction: 4
75 [1]+ Done catch_exception_tool --mach-service=svc --file=out
76 $ *cat out*
77 catch_exception_tool:
78 behavior EXCEPTION_DEFAULT|MACH_EXCEPTION_CODES,
79 pid 1234, thread 56789, exception EXC_CRASH, codes[2] 0x4200001, 0,
80 original exception EXC_BAD_INSTRUCTION, original code[0] 1,
81 signal SIGILL
82 ----
83
84 Run an on-demand exception server started by launchd(5) available via the
85 bootstrap server under the name +svc+:
86 [subs="quotes"]
87 ----
88 $ *on_demand_service_tool --load --label=catch_exception \
89 --mach-service=svc \
90 $(which catch_exception_tool) --mach-service=svc \
91 --file=/tmp/out --persistent --timeout=0*
92 $ *exception_port_tool --set-handler=handler=bootstrap:svc crasher*
93 Illegal instruction: 4
94 $ *on_demand_service_tool --unload --label=catch_exception*
95 $ *cat /tmp/out*
96 catch_exception_tool:
97 behavior EXCEPTION_DEFAULT|MACH_EXCEPTION_CODES,
98 pid 2468, thread 13579, exception EXC_CRASH, codes[2] 0x4200001, 0,
99 original exception EXC_BAD_INSTRUCTION, original code[0] 1,
100 signal SIGILL
101 ----
102
103 == Exit Status
104
105 *0*::
106 Success. In *--persistent* mode with a *--timeout* set, it is considered
107 successful if at least one exception was caught when the timer expires.
108
109 *1*::
110 Failure, with a message printed to the standard error stream.
111
112 == See Also
113
114 man_link:exception_port_tool[1],
115 man_link:on_demand_service_tool[1]
116
117 include::../../doc/support/man_footer.ad[]
OLDNEW
« no previous file with comments | « third_party/crashpad/crashpad/tools/generate_dump.md ('k') | third_party/crashpad/crashpad/tools/mac/catch_exception_tool.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698