Make run_with_crashpad buildable on Fuchsia too

Exception handling in Zircon is very similar to Mach
(https://fuchsia.googlesource.com/zircon/+/HEAD/docs/exceptions.md), so
run_with_crashpad will be useful for testing.

Bug: crashpad:196
Change-Id: Ib6956be284e92671c2e338a5056c18deb948daff
Reviewed-on: https://chromium-review.googlesource.com/1036191
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
This commit is contained in:
Scott Graham 2018-05-01 12:21:38 -07:00 committed by Commit Bot
parent d766e659bb
commit 240e28df2b
4 changed files with 21 additions and 19 deletions

View File

@ -91,6 +91,22 @@ crashpad_executable("generate_dump") {
} }
} }
if (crashpad_is_mac || crashpad_is_fuchsia) {
crashpad_executable("run_with_crashpad") {
sources = [
"run_with_crashpad.cc",
]
deps = [
":tool_support",
"../client",
"../compat",
"../third_party/mini_chromium:base",
"../util",
]
}
}
if (crashpad_is_mac) { if (crashpad_is_mac) {
crashpad_executable("catch_exception_tool") { crashpad_executable("catch_exception_tool") {
sources = [ sources = [
@ -147,18 +163,4 @@ if (crashpad_is_mac) {
"../util", "../util",
] ]
} }
crashpad_executable("run_with_crashpad") {
sources = [
"mac/run_with_crashpad.cc",
]
deps = [
":tool_support",
"../client",
"../compat",
"../third_party/mini_chromium:base",
"../util",
]
}
} }

View File

@ -32,10 +32,10 @@ setting an exception port referencing the handler. Then, executes _COMMAND_
along with any arguments specified (_ARG…_) with the new exception port in along with any arguments specified (_ARG…_) with the new exception port in
effect. effect.
The exception port is configured to receive exceptions of type `EXC_CRASH`, On macOS, the exception port is configured to receive exceptions of type
`EXC_RESOURCE`, and `EXC_GUARD`. The exception behavior is configured as `EXC_CRASH`, `EXC_RESOURCE`, and `EXC_GUARD`. The exception behavior is
`EXCEPTION_STATE_IDENTITY | MACH_EXCEPTION_CODES`. The thread state flavor is configured as `EXCEPTION_STATE_IDENTITY | MACH_EXCEPTION_CODES`. The thread
set to `MACHINE_THREAD_STATE`. state flavor is set to `MACHINE_THREAD_STATE`.
Programs that use the Crashpad client library directly will not normally use Programs that use the Crashpad client library directly will not normally use
this tool. This tool exists to allow programs that are unaware of Crashpad to be this tool. This tool exists to allow programs that are unaware of Crashpad to be

View File

@ -200,7 +200,7 @@
'..', '..',
], ],
'sources': [ 'sources': [
'mac/run_with_crashpad.cc', 'run_with_crashpad.cc',
], ],
}, },
], ],