2022-09-06 19:14:07 -04:00
|
|
|
|
# Copyright 2015 The Crashpad Authors
|
2017-11-17 17:48:22 -08:00
|
|
|
|
#
|
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
|
#
|
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
#
|
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
|
# limitations under the License.
|
|
|
|
|
|
2017-12-19 15:31:04 -08:00
|
|
|
|
import("../build/crashpad_buildconfig.gni")
|
2018-08-13 19:24:49 -04:00
|
|
|
|
import("net/tls.gni")
|
2018-05-29 12:51:41 -07:00
|
|
|
|
|
2018-08-29 09:33:25 -07:00
|
|
|
|
if (crashpad_is_in_chromium) {
|
|
|
|
|
import("//build/config/sanitizers/sanitizers.gni")
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-30 11:39:44 -04:00
|
|
|
|
if (crashpad_is_apple) {
|
2023-08-04 20:09:44 +00:00
|
|
|
|
if (crashpad_is_in_chromium || crashpad_is_in_fuchsia) {
|
2020-04-21 11:56:57 -04:00
|
|
|
|
import("//build/config/sysroot.gni")
|
2023-08-04 20:09:44 +00:00
|
|
|
|
} else {
|
2021-07-28 23:57:54 +00:00
|
|
|
|
import("$mini_chromium_import_root/build/sysroot.gni")
|
2017-12-18 14:35:55 -08:00
|
|
|
|
}
|
2017-11-17 17:48:22 -08:00
|
|
|
|
|
|
|
|
|
action_foreach("mig") {
|
|
|
|
|
script = "mach/mig.py"
|
2020-04-21 11:56:57 -04:00
|
|
|
|
inputs = [
|
|
|
|
|
"mach/mig_fix.py",
|
|
|
|
|
"mach/mig_gen.py",
|
|
|
|
|
]
|
2017-11-17 17:48:22 -08:00
|
|
|
|
|
ios: Provide a copy of exc.defs and run mig on it to generate exc stubs
The iOS SDK doesn’t include a copy of <mach/exc.defs>. It only provides
<mach/exc.h>, which is just the user-side header. To obtain declarations
and implementations of the server-side stubs, a current copy of
<mach/exc.defs> is added to third_party, and the mig action in util is
updated to use it on iOS.
The three other mig subsystems that Crashpad uses are not brought to
iOS:
- mach_exc is identical to exc except it always uses 64-bit quantities
for addresses in place of exc’s use of quantiies sized for native
pointers. Because all iOS work is limited to a single process, there
is no need to consider cross-process operation with variable bitness,
so mach_exc is unnecessary. We’re also only targeting 64-bit for iOS,
so exc will always suffice. This follows the spirit of other
mach_-prefixed routines on iOS, where Apple forbids mach_vm_read to
user applications but permits vm_read.
- notify is primarily used on macOS in the Crashpad handler process to
receive a no-senders notification, which is used to trigger handler
shutdown when it has no more clients. This is not believed to be
useful to Crashpad on iOS, which is restricted to single-process
operation.
- child_port is a Crashpad-specific subsystem used to pass Mach rights
between processes, but is similarly useless when restricted to
single-process operation as on iOS.
Bug: crashpad:31
Change-Id: Id4cb3cdd529814438d378c20702c82c1e89dd2be
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2154530
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Justin Cohen <justincohen@chromium.org>
2020-04-17 16:43:39 -04:00
|
|
|
|
if (crashpad_is_mac) {
|
|
|
|
|
sources = [
|
|
|
|
|
"$sysroot/usr/include/mach/exc.defs",
|
|
|
|
|
"$sysroot/usr/include/mach/mach_exc.defs",
|
|
|
|
|
"$sysroot/usr/include/mach/notify.defs",
|
|
|
|
|
"mach/child_port.defs",
|
|
|
|
|
]
|
|
|
|
|
} else if (crashpad_is_ios) {
|
ios: Provide a copy of mach_exc.defs and run mig on it
This updates (and corrects) 8dbbaff2e1a5, which added exc.defs, by
adding mach_exc.defs too.
The difference betwen the exc and mach_exc subsystems is that the |code|
parameter is int[] in exc and int64_t[] in mach_exc. Many exceptions
carry the exception address in code[1], and a 32-bit int results in the
exception address being truncated in exc. No information is lost in
mach_exc, where a 64-bit int64_t is used.
In 8dbbaff2e1a5, I misremembered the type of the |code| parameter as a
type derived from uintptr_t, such as vm_address_t, an integer as wide as
a pointer. I was wrong, and mach_exc is necessary. I also noted that
Apple normally forbids mach_-prefixed interfaces in favor of the
prefix-less ones for the reasons I mentioned, and that, all else being
equal, it was desirable to adhere to the spirit of that convention.
Because neither exc nor mach_exc are available in the SDK, it’s moot
from a technical perspective, as we need to provide our own stubs either
way.
Bug: crashpad:31
Change-Id: Ied1be470e653b2bead1a283cb8b9283d210c328d
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2159286
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2020-04-21 10:56:57 -04:00
|
|
|
|
sources = [
|
2020-04-21 11:56:57 -04:00
|
|
|
|
# The iOS SDK doesn’t have any .defs files. Get them directly from xnu.
|
ios: Provide a copy of mach_exc.defs and run mig on it
This updates (and corrects) 8dbbaff2e1a5, which added exc.defs, by
adding mach_exc.defs too.
The difference betwen the exc and mach_exc subsystems is that the |code|
parameter is int[] in exc and int64_t[] in mach_exc. Many exceptions
carry the exception address in code[1], and a 32-bit int results in the
exception address being truncated in exc. No information is lost in
mach_exc, where a 64-bit int64_t is used.
In 8dbbaff2e1a5, I misremembered the type of the |code| parameter as a
type derived from uintptr_t, such as vm_address_t, an integer as wide as
a pointer. I was wrong, and mach_exc is necessary. I also noted that
Apple normally forbids mach_-prefixed interfaces in favor of the
prefix-less ones for the reasons I mentioned, and that, all else being
equal, it was desirable to adhere to the spirit of that convention.
Because neither exc nor mach_exc are available in the SDK, it’s moot
from a technical perspective, as we need to provide our own stubs either
way.
Bug: crashpad:31
Change-Id: Ied1be470e653b2bead1a283cb8b9283d210c328d
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2159286
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2020-04-21 10:56:57 -04:00
|
|
|
|
"../third_party/xnu/osfmk/mach/exc.defs",
|
|
|
|
|
"../third_party/xnu/osfmk/mach/mach_exc.defs",
|
|
|
|
|
]
|
ios: Provide a copy of exc.defs and run mig on it to generate exc stubs
The iOS SDK doesn’t include a copy of <mach/exc.defs>. It only provides
<mach/exc.h>, which is just the user-side header. To obtain declarations
and implementations of the server-side stubs, a current copy of
<mach/exc.defs> is added to third_party, and the mig action in util is
updated to use it on iOS.
The three other mig subsystems that Crashpad uses are not brought to
iOS:
- mach_exc is identical to exc except it always uses 64-bit quantities
for addresses in place of exc’s use of quantiies sized for native
pointers. Because all iOS work is limited to a single process, there
is no need to consider cross-process operation with variable bitness,
so mach_exc is unnecessary. We’re also only targeting 64-bit for iOS,
so exc will always suffice. This follows the spirit of other
mach_-prefixed routines on iOS, where Apple forbids mach_vm_read to
user applications but permits vm_read.
- notify is primarily used on macOS in the Crashpad handler process to
receive a no-senders notification, which is used to trigger handler
shutdown when it has no more clients. This is not believed to be
useful to Crashpad on iOS, which is restricted to single-process
operation.
- child_port is a Crashpad-specific subsystem used to pass Mach rights
between processes, but is similarly useless when restricted to
single-process operation as on iOS.
Bug: crashpad:31
Change-Id: Id4cb3cdd529814438d378c20702c82c1e89dd2be
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2154530
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Justin Cohen <justincohen@chromium.org>
2020-04-17 16:43:39 -04:00
|
|
|
|
}
|
2017-11-17 17:48:22 -08:00
|
|
|
|
|
|
|
|
|
outputs = [
|
|
|
|
|
"$target_gen_dir/mach/{{source_name_part}}User.c",
|
|
|
|
|
"$target_gen_dir/mach/{{source_name_part}}Server.c",
|
|
|
|
|
"$target_gen_dir/mach/{{source_name_part}}.h",
|
|
|
|
|
"$target_gen_dir/mach/{{source_name_part}}Server.h",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
args = [ "{{source}}" ]
|
|
|
|
|
args += rebase_path(outputs, root_build_dir)
|
2017-12-18 14:35:55 -08:00
|
|
|
|
if (crashpad_is_in_chromium) {
|
|
|
|
|
if (!use_system_xcode) {
|
2019-06-07 11:37:56 -07:00
|
|
|
|
import("//build/config/clang/clang.gni")
|
|
|
|
|
import("//build/config/mac/mac_sdk.gni")
|
2019-09-05 17:53:01 -07:00
|
|
|
|
clang_path =
|
|
|
|
|
rebase_path("$clang_base_path/bin/", root_build_dir) + "clang"
|
2019-06-07 11:37:56 -07:00
|
|
|
|
mig_path = "$mac_bin_path" + "mig"
|
|
|
|
|
migcom_path = "$mac_bin_path" + "../libexec/migcom"
|
|
|
|
|
|
2017-12-18 14:35:55 -08:00
|
|
|
|
args += [
|
2019-06-07 11:37:56 -07:00
|
|
|
|
"--clang-path",
|
|
|
|
|
clang_path,
|
|
|
|
|
"--mig-path",
|
|
|
|
|
mig_path,
|
|
|
|
|
"--migcom-path",
|
|
|
|
|
migcom_path,
|
2017-12-18 14:35:55 -08:00
|
|
|
|
]
|
|
|
|
|
}
|
2021-04-09 15:12:59 -04:00
|
|
|
|
if (crashpad_is_mac) {
|
|
|
|
|
deps = [ "//build/config/mac:sdk_inputs" ]
|
|
|
|
|
}
|
2017-11-17 17:48:22 -08:00
|
|
|
|
}
|
2020-04-21 11:56:57 -04:00
|
|
|
|
if (sysroot != "") {
|
2020-04-30 21:35:16 -04:00
|
|
|
|
if (crashpad_is_in_chromium) {
|
|
|
|
|
# Chromium often brings along its own SDK and wants to keep paths
|
|
|
|
|
# relative…
|
|
|
|
|
args += [
|
|
|
|
|
"--sdk",
|
2020-05-06 20:39:19 -04:00
|
|
|
|
rebase_path(sysroot, root_build_dir),
|
2020-04-30 21:35:16 -04:00
|
|
|
|
]
|
|
|
|
|
} else {
|
|
|
|
|
# …but that’s not an option in the standalone Crashpad build, where the
|
|
|
|
|
# SDK is installed on the system and is absolute. (But use rebase_path
|
|
|
|
|
# just to be sure.)
|
|
|
|
|
args += [
|
|
|
|
|
"--sdk",
|
|
|
|
|
rebase_path(sysroot, ""),
|
|
|
|
|
]
|
|
|
|
|
}
|
2017-12-15 18:49:34 -05:00
|
|
|
|
}
|
2017-11-17 17:48:22 -08:00
|
|
|
|
args += [
|
2020-04-22 10:44:15 -04:00
|
|
|
|
"--include",
|
|
|
|
|
rebase_path("..", root_build_dir),
|
2017-11-17 17:48:22 -08:00
|
|
|
|
"--include",
|
|
|
|
|
rebase_path("../compat/mac", root_build_dir),
|
|
|
|
|
]
|
2020-04-21 11:56:57 -04:00
|
|
|
|
if (crashpad_is_ios) {
|
|
|
|
|
args += [
|
|
|
|
|
"--include",
|
2020-04-22 10:44:15 -04:00
|
|
|
|
rebase_path("../compat/ios", root_build_dir),
|
2020-04-21 11:56:57 -04:00
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
if (current_cpu == "x86") {
|
|
|
|
|
args += [
|
|
|
|
|
"--arch",
|
|
|
|
|
"i386",
|
|
|
|
|
]
|
|
|
|
|
} else if (current_cpu == "x64") {
|
|
|
|
|
args += [
|
|
|
|
|
"--arch",
|
|
|
|
|
"x86_64",
|
|
|
|
|
]
|
|
|
|
|
} else if (current_cpu == "arm") {
|
|
|
|
|
args += [
|
|
|
|
|
"--arch",
|
|
|
|
|
"armv7",
|
|
|
|
|
]
|
|
|
|
|
} else if (current_cpu == "arm64") {
|
|
|
|
|
args += [
|
|
|
|
|
"--arch",
|
|
|
|
|
"arm64",
|
|
|
|
|
]
|
2020-09-02 16:42:59 -04:00
|
|
|
|
} else if (crashpad_is_mac && current_cpu == "mac_universal") {
|
|
|
|
|
args += [
|
|
|
|
|
"--arch",
|
|
|
|
|
"x86_64",
|
|
|
|
|
"--arch",
|
|
|
|
|
"arm64",
|
|
|
|
|
]
|
|
|
|
|
} else {
|
|
|
|
|
assert(false, "Unsupported architecture")
|
2020-04-21 11:56:57 -04:00
|
|
|
|
}
|
2017-11-17 17:48:22 -08:00
|
|
|
|
}
|
2020-03-23 14:59:21 -04:00
|
|
|
|
|
2020-04-22 10:44:15 -04:00
|
|
|
|
static_library("mig_output") {
|
2020-03-23 14:59:21 -04:00
|
|
|
|
deps = [ ":mig" ]
|
|
|
|
|
sources = get_target_outputs(":mig")
|
|
|
|
|
if (crashpad_is_in_chromium) {
|
|
|
|
|
# mig output contains unreachable code, which irks -Wunreachable-code.
|
|
|
|
|
configs -= [ "//build/config/compiler:chromium_code" ]
|
|
|
|
|
configs += [ "//build/config/compiler:no_chromium_code" ]
|
|
|
|
|
}
|
|
|
|
|
public_configs = [ "..:crashpad_config" ]
|
|
|
|
|
}
|
2017-11-17 17:48:22 -08:00
|
|
|
|
}
|
|
|
|
|
|
Add WER runtime exception helper module for Windows
This adds a runtime exception helper (& test module) for Windows and
plumbing to allow the module to be registered by the crashpad client,
and to trigger the crashpad handler. Embedders can build their own
module to control which exceptions are passed to the handler.
See: go/chrome-windows-runtime-exception-helper for motivation.
When registered (which is the responsibility of the embedding
application), the helper is loaded by WerFault.exe when Windows
Error Reporting receives crashes that are not caught by crashpad's
normal handlers - for instance a control-flow violation when a
module is compiled with /guard:cf.
Registration:
The embedder must arrange for the full path to the helper to
be added in the appropriate Windows Error Reporting\
RuntimeExceptionHelperModules registry key.
Once an embedder's crashpad client is connected to a crashpad
handler (e.g. through SetIpcPipeName()) the embedder calls
RegisterWerModule. Internally, this registration includes handles
used to trigger the crashpad handler, an area reserved to hold an
exception and context, and structures needed by the crashpad handler.
Following a crash:
WerFault.exe handles the crash then validates and loads the helper
module. WER hands the helper module a handle to the crashing target
process and copies of the exception and context for the faulting thread.
The helper then copies out the client's registration data and
duplicates handles to the crashpad handler, then fills back the various structures in the paused client that the crashpad handler will need.
The helper then signals the crashpad handler, which collects a dump then
notifies the helper that it is done.
Support:
WerRegisterExceptionHelperModule has been availble since at least
Windows 7 but WerFault would not pass on the exceptions that crashpad
could not already handle. This changed in Windows 10 20H1 (19041),
which supports HKCU and HKLM registrations, and passes in more types of
crashes. It is harmless to register the module for earlier versions
of Windows as it simply won't be loaded by WerFault.exe.
Tests:
snapshot/win/end_to_end_test.py has been refactored slightly to
group crash generation and output validation in main() by breaking
up RunTests into smaller functions.
As the module works by being loaded in WerFault.exe it is tested
in end_to_end_test.py.
Bug: crashpad:133, 866033, 865632
Change-Id: Id668bd15a510a24c79753e1bb03e9456f41a9780
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3677284
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Alex Gough <ajgo@chromium.org>
2022-07-06 13:53:12 -07:00
|
|
|
|
# Used by crashpad_wer_handler to avoid linking all of :util.
|
|
|
|
|
if (crashpad_is_win) {
|
|
|
|
|
source_set("util_registration_protocol") {
|
|
|
|
|
sources = [
|
|
|
|
|
"misc/address_types.h",
|
|
|
|
|
"win/address_types.h",
|
2022-08-31 13:51:18 -04:00
|
|
|
|
"win/registration_protocol_win_structs.h",
|
Add WER runtime exception helper module for Windows
This adds a runtime exception helper (& test module) for Windows and
plumbing to allow the module to be registered by the crashpad client,
and to trigger the crashpad handler. Embedders can build their own
module to control which exceptions are passed to the handler.
See: go/chrome-windows-runtime-exception-helper for motivation.
When registered (which is the responsibility of the embedding
application), the helper is loaded by WerFault.exe when Windows
Error Reporting receives crashes that are not caught by crashpad's
normal handlers - for instance a control-flow violation when a
module is compiled with /guard:cf.
Registration:
The embedder must arrange for the full path to the helper to
be added in the appropriate Windows Error Reporting\
RuntimeExceptionHelperModules registry key.
Once an embedder's crashpad client is connected to a crashpad
handler (e.g. through SetIpcPipeName()) the embedder calls
RegisterWerModule. Internally, this registration includes handles
used to trigger the crashpad handler, an area reserved to hold an
exception and context, and structures needed by the crashpad handler.
Following a crash:
WerFault.exe handles the crash then validates and loads the helper
module. WER hands the helper module a handle to the crashing target
process and copies of the exception and context for the faulting thread.
The helper then copies out the client's registration data and
duplicates handles to the crashpad handler, then fills back the various structures in the paused client that the crashpad handler will need.
The helper then signals the crashpad handler, which collects a dump then
notifies the helper that it is done.
Support:
WerRegisterExceptionHelperModule has been availble since at least
Windows 7 but WerFault would not pass on the exceptions that crashpad
could not already handle. This changed in Windows 10 20H1 (19041),
which supports HKCU and HKLM registrations, and passes in more types of
crashes. It is harmless to register the module for earlier versions
of Windows as it simply won't be loaded by WerFault.exe.
Tests:
snapshot/win/end_to_end_test.py has been refactored slightly to
group crash generation and output validation in main() by breaking
up RunTests into smaller functions.
As the module works by being loaded in WerFault.exe it is tested
in end_to_end_test.py.
Bug: crashpad:133, 866033, 865632
Change-Id: Id668bd15a510a24c79753e1bb03e9456f41a9780
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3677284
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Commit-Queue: Alex Gough <ajgo@chromium.org>
2022-07-06 13:53:12 -07:00
|
|
|
|
]
|
|
|
|
|
public_deps = [ "../third_party/mini_chromium:build" ]
|
|
|
|
|
public_configs = [ "..:crashpad_config" ]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-09-14 14:22:05 -07:00
|
|
|
|
crashpad_static_library("util") {
|
2017-11-17 17:48:22 -08:00
|
|
|
|
sources = [
|
|
|
|
|
"file/delimited_file_reader.cc",
|
|
|
|
|
"file/delimited_file_reader.h",
|
|
|
|
|
"file/directory_reader.h",
|
2020-06-24 09:03:47 +02:00
|
|
|
|
"file/file_helper.cc",
|
|
|
|
|
"file/file_helper.h",
|
2017-11-17 17:48:22 -08:00
|
|
|
|
"file/file_io.cc",
|
|
|
|
|
"file/file_io.h",
|
|
|
|
|
"file/file_reader.cc",
|
|
|
|
|
"file/file_reader.h",
|
|
|
|
|
"file/file_seeker.cc",
|
|
|
|
|
"file/file_seeker.h",
|
|
|
|
|
"file/file_writer.cc",
|
|
|
|
|
"file/file_writer.h",
|
|
|
|
|
"file/filesystem.h",
|
2020-01-28 12:02:55 -08:00
|
|
|
|
"file/output_stream_file_writer.cc",
|
|
|
|
|
"file/output_stream_file_writer.h",
|
2017-11-17 17:48:22 -08:00
|
|
|
|
"file/scoped_remove_file.cc",
|
|
|
|
|
"file/scoped_remove_file.h",
|
|
|
|
|
"file/string_file.cc",
|
|
|
|
|
"file/string_file.h",
|
|
|
|
|
"misc/address_sanitizer.h",
|
|
|
|
|
"misc/address_types.h",
|
2019-01-03 13:36:02 -05:00
|
|
|
|
"misc/arraysize.h",
|
2017-11-17 17:48:22 -08:00
|
|
|
|
"misc/as_underlying_type.h",
|
2018-02-08 16:25:22 -08:00
|
|
|
|
"misc/capture_context.h",
|
2017-11-17 17:48:22 -08:00
|
|
|
|
"misc/clock.h",
|
2018-02-15 10:38:36 -08:00
|
|
|
|
"misc/elf_note_types.h",
|
2017-11-17 17:48:22 -08:00
|
|
|
|
"misc/from_pointer_cast.h",
|
|
|
|
|
"misc/implicit_cast.h",
|
|
|
|
|
"misc/initialization_state.h",
|
|
|
|
|
"misc/initialization_state_dcheck.cc",
|
|
|
|
|
"misc/initialization_state_dcheck.h",
|
|
|
|
|
"misc/lexing.cc",
|
|
|
|
|
"misc/lexing.h",
|
2019-06-28 15:20:01 -07:00
|
|
|
|
"misc/memory_sanitizer.h",
|
2017-11-17 17:48:22 -08:00
|
|
|
|
"misc/metrics.cc",
|
|
|
|
|
"misc/metrics.h",
|
|
|
|
|
"misc/paths.h",
|
|
|
|
|
"misc/pdb_structures.cc",
|
|
|
|
|
"misc/pdb_structures.h",
|
|
|
|
|
"misc/random_string.cc",
|
|
|
|
|
"misc/random_string.h",
|
2018-06-11 09:38:24 -07:00
|
|
|
|
"misc/range_set.cc",
|
|
|
|
|
"misc/range_set.h",
|
2017-11-17 17:48:22 -08:00
|
|
|
|
"misc/reinterpret_bytes.cc",
|
|
|
|
|
"misc/reinterpret_bytes.h",
|
|
|
|
|
"misc/scoped_forbid_return.cc",
|
|
|
|
|
"misc/scoped_forbid_return.h",
|
|
|
|
|
"misc/symbolic_constants_common.h",
|
|
|
|
|
"misc/time.cc",
|
|
|
|
|
"misc/time.h",
|
|
|
|
|
"misc/tri_state.h",
|
|
|
|
|
"misc/uuid.cc",
|
|
|
|
|
"misc/uuid.h",
|
|
|
|
|
"misc/zlib.cc",
|
|
|
|
|
"misc/zlib.h",
|
|
|
|
|
"numeric/checked_address_range.cc",
|
|
|
|
|
"numeric/checked_address_range.h",
|
|
|
|
|
"numeric/checked_range.h",
|
|
|
|
|
"numeric/checked_vm_address_range.h",
|
|
|
|
|
"numeric/in_range_cast.h",
|
|
|
|
|
"numeric/int128.h",
|
|
|
|
|
"numeric/safe_assignment.h",
|
2019-04-24 11:22:35 -04:00
|
|
|
|
"process/process_id.h",
|
2018-12-20 11:12:51 -08:00
|
|
|
|
"process/process_memory.cc",
|
|
|
|
|
"process/process_memory.h",
|
|
|
|
|
"process/process_memory_native.h",
|
|
|
|
|
"process/process_memory_range.cc",
|
|
|
|
|
"process/process_memory_range.h",
|
2017-11-17 17:48:22 -08:00
|
|
|
|
"stdlib/aligned_allocator.cc",
|
|
|
|
|
"stdlib/aligned_allocator.h",
|
|
|
|
|
"stdlib/map_insert.h",
|
|
|
|
|
"stdlib/objc.h",
|
|
|
|
|
"stdlib/string_number_conversion.cc",
|
|
|
|
|
"stdlib/string_number_conversion.h",
|
|
|
|
|
"stdlib/strlcpy.cc",
|
|
|
|
|
"stdlib/strlcpy.h",
|
|
|
|
|
"stdlib/strnlen.cc",
|
|
|
|
|
"stdlib/strnlen.h",
|
|
|
|
|
"stdlib/thread_safe_vector.h",
|
2019-12-06 10:54:44 -08:00
|
|
|
|
"stream/base94_output_stream.cc",
|
|
|
|
|
"stream/base94_output_stream.h",
|
2019-12-18 11:33:39 -08:00
|
|
|
|
"stream/file_encoder.cc",
|
|
|
|
|
"stream/file_encoder.h",
|
|
|
|
|
"stream/file_output_stream.cc",
|
|
|
|
|
"stream/file_output_stream.h",
|
2019-12-12 13:15:05 -08:00
|
|
|
|
"stream/log_output_stream.cc",
|
|
|
|
|
"stream/log_output_stream.h",
|
2019-09-05 17:53:01 -07:00
|
|
|
|
"stream/output_stream_interface.h",
|
|
|
|
|
"stream/zlib_output_stream.cc",
|
|
|
|
|
"stream/zlib_output_stream.h",
|
2017-11-17 17:48:22 -08:00
|
|
|
|
"string/split_string.cc",
|
|
|
|
|
"string/split_string.h",
|
2022-12-14 14:02:29 -07:00
|
|
|
|
"synchronization/scoped_spin_guard.h",
|
2017-11-17 17:48:22 -08:00
|
|
|
|
"synchronization/semaphore.h",
|
2018-02-20 10:55:17 -08:00
|
|
|
|
"thread/stoppable.h",
|
2017-11-17 17:48:22 -08:00
|
|
|
|
"thread/thread.cc",
|
|
|
|
|
"thread/thread.h",
|
|
|
|
|
"thread/thread_log_messages.cc",
|
|
|
|
|
"thread/thread_log_messages.h",
|
|
|
|
|
"thread/worker_thread.cc",
|
|
|
|
|
"thread/worker_thread.h",
|
|
|
|
|
]
|
|
|
|
|
|
2019-09-05 17:53:01 -07:00
|
|
|
|
defines = [ "ZLIB_CONST" ]
|
|
|
|
|
|
2018-04-04 15:12:50 -07:00
|
|
|
|
if (crashpad_is_posix || crashpad_is_fuchsia) {
|
2017-11-30 09:59:59 -08:00
|
|
|
|
sources += [
|
|
|
|
|
"file/directory_reader_posix.cc",
|
|
|
|
|
"file/file_io_posix.cc",
|
|
|
|
|
"file/filesystem_posix.cc",
|
|
|
|
|
"misc/clock_posix.cc",
|
|
|
|
|
"posix/close_stdio.cc",
|
|
|
|
|
"posix/close_stdio.h",
|
|
|
|
|
"posix/scoped_dir.cc",
|
|
|
|
|
"posix/scoped_dir.h",
|
|
|
|
|
"posix/scoped_mmap.cc",
|
|
|
|
|
"posix/scoped_mmap.h",
|
|
|
|
|
"posix/signals.cc",
|
|
|
|
|
"posix/signals.h",
|
|
|
|
|
"synchronization/semaphore_posix.cc",
|
|
|
|
|
"thread/thread_posix.cc",
|
|
|
|
|
]
|
|
|
|
|
|
2017-12-19 15:31:04 -08:00
|
|
|
|
if (!crashpad_is_fuchsia) {
|
2017-11-30 09:59:59 -08:00
|
|
|
|
sources += [
|
|
|
|
|
"posix/close_multiple.cc",
|
|
|
|
|
"posix/close_multiple.h",
|
|
|
|
|
"posix/drop_privileges.cc",
|
|
|
|
|
"posix/drop_privileges.h",
|
2017-12-05 15:16:08 -08:00
|
|
|
|
"posix/process_info.h",
|
2022-06-24 19:20:54 +05:30
|
|
|
|
"posix/spawn_subprocess.cc",
|
|
|
|
|
"posix/spawn_subprocess.h",
|
2017-11-30 09:59:59 -08:00
|
|
|
|
|
|
|
|
|
# These map signals to and from strings. While Fuchsia defines some of
|
|
|
|
|
# the common SIGx defines, signals are never raised on Fuchsia, so
|
|
|
|
|
# there's need to include this mapping code.
|
|
|
|
|
"posix/symbolic_constants_posix.cc",
|
|
|
|
|
"posix/symbolic_constants_posix.h",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-30 11:39:44 -04:00
|
|
|
|
if (crashpad_is_apple) {
|
2020-03-25 16:12:22 -04:00
|
|
|
|
sources += [
|
2024-06-04 12:07:20 -04:00
|
|
|
|
"mac/sysctl.cc",
|
|
|
|
|
"mac/sysctl.h",
|
2020-03-25 16:12:22 -04:00
|
|
|
|
"mac/xattr.cc",
|
|
|
|
|
"mac/xattr.h",
|
2020-04-21 11:59:44 -04:00
|
|
|
|
"mach/composite_mach_message_server.cc",
|
|
|
|
|
"mach/composite_mach_message_server.h",
|
|
|
|
|
"mach/exc_client_variants.cc",
|
|
|
|
|
"mach/exc_client_variants.h",
|
|
|
|
|
"mach/exc_server_variants.cc",
|
|
|
|
|
"mach/exc_server_variants.h",
|
ios: Build four more Mach message and exception utilities
This enables the following code in util/mach on iOS:
- exception_behaviors.{cc,h}
- exception_ports.{cc,h}
- mach_message.{cc,h}
- mach_message_server.{cc,h}
Only the ExceptionBehaviors and MachMessage tests are built, because the
other two are tested by multiprocess tests that won’t run on iOS.
The AuditPIDFromMachMessageTrailer function from mach_message.h is
excluded on iOS because it relies on <bsm/libbsm.h>, which is broken on
iOS: it depends on <bsm/audit_record.h>, which is missing from the SDK.
Additionally, the BSM function that Crashpad uses, audit_token_to_au32,
is marked as unavailable on iOS. Crashpad uses it on macOS to
authenticate Mach messages sent by other processes, but this is moot on
iOS.
Bug: crashpad:31
Change-Id: I5ebc4b80543989b9cd0b85b82eb4b3ff98c44e6c
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2155086
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2020-04-17 17:45:18 -04:00
|
|
|
|
"mach/exception_behaviors.cc",
|
|
|
|
|
"mach/exception_behaviors.h",
|
|
|
|
|
"mach/exception_ports.cc",
|
|
|
|
|
"mach/exception_ports.h",
|
2020-04-17 11:29:09 -04:00
|
|
|
|
"mach/mach_extensions.cc",
|
|
|
|
|
"mach/mach_extensions.h",
|
ios: Build four more Mach message and exception utilities
This enables the following code in util/mach on iOS:
- exception_behaviors.{cc,h}
- exception_ports.{cc,h}
- mach_message.{cc,h}
- mach_message_server.{cc,h}
Only the ExceptionBehaviors and MachMessage tests are built, because the
other two are tested by multiprocess tests that won’t run on iOS.
The AuditPIDFromMachMessageTrailer function from mach_message.h is
excluded on iOS because it relies on <bsm/libbsm.h>, which is broken on
iOS: it depends on <bsm/audit_record.h>, which is missing from the SDK.
Additionally, the BSM function that Crashpad uses, audit_token_to_au32,
is marked as unavailable on iOS. Crashpad uses it on macOS to
authenticate Mach messages sent by other processes, but this is moot on
iOS.
Bug: crashpad:31
Change-Id: I5ebc4b80543989b9cd0b85b82eb4b3ff98c44e6c
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2155086
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2020-04-17 17:45:18 -04:00
|
|
|
|
"mach/mach_message.cc",
|
|
|
|
|
"mach/mach_message.h",
|
|
|
|
|
"mach/mach_message_server.cc",
|
|
|
|
|
"mach/mach_message_server.h",
|
2020-04-28 11:52:14 -04:00
|
|
|
|
"mach/symbolic_constants_mach.cc",
|
|
|
|
|
"mach/symbolic_constants_mach.h",
|
2020-04-25 17:16:10 -04:00
|
|
|
|
"misc/capture_context_mac.S",
|
2020-04-17 10:37:15 -04:00
|
|
|
|
"misc/clock_mac.cc",
|
|
|
|
|
"misc/paths_mac.cc",
|
|
|
|
|
"synchronization/semaphore_mac.cc",
|
2020-03-25 16:12:22 -04:00
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2021-08-26 00:13:29 -07:00
|
|
|
|
if (crashpad_is_mac && !crashpad_is_in_fuchsia) {
|
2017-11-17 17:48:22 -08:00
|
|
|
|
sources += [
|
2017-11-28 10:31:13 -08:00
|
|
|
|
"mac/checked_mach_address_range.h",
|
|
|
|
|
"mac/launchd.h",
|
|
|
|
|
"mac/launchd.mm",
|
|
|
|
|
"mac/mac_util.cc",
|
|
|
|
|
"mac/mac_util.h",
|
|
|
|
|
"mac/service_management.cc",
|
|
|
|
|
"mac/service_management.h",
|
2020-04-17 11:29:09 -04:00
|
|
|
|
"mach/bootstrap.cc",
|
|
|
|
|
"mach/bootstrap.h",
|
2017-11-17 17:48:22 -08:00
|
|
|
|
"mach/child_port_handshake.cc",
|
|
|
|
|
"mach/child_port_handshake.h",
|
|
|
|
|
"mach/child_port_server.cc",
|
|
|
|
|
"mach/child_port_server.h",
|
|
|
|
|
"mach/child_port_types.h",
|
|
|
|
|
"mach/exception_types.cc",
|
|
|
|
|
"mach/exception_types.h",
|
|
|
|
|
"mach/notify_server.cc",
|
|
|
|
|
"mach/notify_server.h",
|
|
|
|
|
"mach/scoped_task_suspend.cc",
|
|
|
|
|
"mach/scoped_task_suspend.h",
|
|
|
|
|
"mach/task_for_pid.cc",
|
|
|
|
|
"mach/task_for_pid.h",
|
2017-11-28 10:31:13 -08:00
|
|
|
|
"posix/process_info_mac.cc",
|
2018-12-20 13:12:55 -08:00
|
|
|
|
"process/process_memory_mac.cc",
|
|
|
|
|
"process/process_memory_mac.h",
|
2020-04-17 10:37:15 -04:00
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (crashpad_is_ios) {
|
|
|
|
|
sources += [
|
ios: Add support for intermediate dump reader and writer.
Due to the limitations of in-process handling, an intermediate dump file
is written during exceptions. The data is streamed to a file using only
in-process safe methods. The file format is similar to binary JSON,
supporting keyed properties, maps and arrays.
- Property [key:int, length:int, value:intarray]
- StartMap [key:int], followed by repeating Properties until EndMap
- StartArray [key:int], followed by repeating Maps until EndArray
- EndMap, EndArray, EndDocument
Similar to JSON, maps can contain other maps, arrays and properties.
Once loaded, the binary file is read into a set of data structures that
expose the data, maps and arrays.
Bug: crashpad: 31
Change-Id: I43a19204935303afd753c8c7090c54099634ccd6
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2870807
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2021-05-20 11:10:34 -04:00
|
|
|
|
"ios/ios_intermediate_dump_data.cc",
|
|
|
|
|
"ios/ios_intermediate_dump_data.h",
|
|
|
|
|
"ios/ios_intermediate_dump_format.h",
|
2021-11-20 23:03:45 -05:00
|
|
|
|
"ios/ios_intermediate_dump_interface.cc",
|
|
|
|
|
"ios/ios_intermediate_dump_interface.h",
|
ios: Add support for intermediate dump reader and writer.
Due to the limitations of in-process handling, an intermediate dump file
is written during exceptions. The data is streamed to a file using only
in-process safe methods. The file format is similar to binary JSON,
supporting keyed properties, maps and arrays.
- Property [key:int, length:int, value:intarray]
- StartMap [key:int], followed by repeating Properties until EndMap
- StartArray [key:int], followed by repeating Maps until EndArray
- EndMap, EndArray, EndDocument
Similar to JSON, maps can contain other maps, arrays and properties.
Once loaded, the binary file is read into a set of data structures that
expose the data, maps and arrays.
Bug: crashpad: 31
Change-Id: I43a19204935303afd753c8c7090c54099634ccd6
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2870807
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2021-05-20 11:10:34 -04:00
|
|
|
|
"ios/ios_intermediate_dump_list.cc",
|
|
|
|
|
"ios/ios_intermediate_dump_list.h",
|
|
|
|
|
"ios/ios_intermediate_dump_map.cc",
|
|
|
|
|
"ios/ios_intermediate_dump_map.h",
|
|
|
|
|
"ios/ios_intermediate_dump_object.cc",
|
|
|
|
|
"ios/ios_intermediate_dump_object.h",
|
|
|
|
|
"ios/ios_intermediate_dump_reader.cc",
|
|
|
|
|
"ios/ios_intermediate_dump_reader.h",
|
|
|
|
|
"ios/ios_intermediate_dump_writer.cc",
|
|
|
|
|
"ios/ios_intermediate_dump_writer.h",
|
2020-04-17 10:37:15 -04:00
|
|
|
|
"ios/ios_system_data_collector.h",
|
|
|
|
|
"ios/ios_system_data_collector.mm",
|
2021-05-07 14:32:20 -04:00
|
|
|
|
"ios/raw_logging.cc",
|
|
|
|
|
"ios/raw_logging.h",
|
2022-03-14 11:03:06 -04:00
|
|
|
|
"ios/scoped_background_task.h",
|
|
|
|
|
"ios/scoped_background_task.mm",
|
2023-01-30 15:02:31 -07:00
|
|
|
|
"ios/scoped_vm_map.cc",
|
|
|
|
|
"ios/scoped_vm_map.h",
|
2023-06-30 11:39:44 -04:00
|
|
|
|
"ios/scoped_vm_read.cc",
|
|
|
|
|
"ios/scoped_vm_read.h",
|
2017-11-17 17:48:22 -08:00
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2018-05-30 15:08:18 -07:00
|
|
|
|
deps = []
|
|
|
|
|
|
2020-04-08 09:56:20 -07:00
|
|
|
|
if (crashpad_is_android) {
|
|
|
|
|
sources += [
|
|
|
|
|
"linux/initial_signal_dispositions.cc",
|
|
|
|
|
"linux/initial_signal_dispositions.h",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2017-12-21 17:54:12 -05:00
|
|
|
|
if (crashpad_is_linux || crashpad_is_android) {
|
2017-12-19 14:21:14 -05:00
|
|
|
|
sources += [
|
|
|
|
|
"linux/address_types.h",
|
|
|
|
|
"linux/auxiliary_vector.cc",
|
|
|
|
|
"linux/auxiliary_vector.h",
|
|
|
|
|
"linux/checked_linux_address_range.h",
|
|
|
|
|
"linux/direct_ptrace_connection.cc",
|
|
|
|
|
"linux/direct_ptrace_connection.h",
|
2017-12-19 17:13:13 -05:00
|
|
|
|
"linux/exception_handler_client.cc",
|
|
|
|
|
"linux/exception_handler_client.h",
|
2018-06-12 08:30:36 -07:00
|
|
|
|
"linux/exception_handler_protocol.cc",
|
2017-12-19 17:13:13 -05:00
|
|
|
|
"linux/exception_handler_protocol.h",
|
2017-12-19 14:21:14 -05:00
|
|
|
|
"linux/exception_information.h",
|
|
|
|
|
"linux/memory_map.cc",
|
|
|
|
|
"linux/memory_map.h",
|
2023-04-04 17:02:57 +00:00
|
|
|
|
"linux/pac_helper.cc",
|
|
|
|
|
"linux/pac_helper.h",
|
2017-12-19 14:21:14 -05:00
|
|
|
|
"linux/proc_stat_reader.cc",
|
|
|
|
|
"linux/proc_stat_reader.h",
|
2019-04-29 14:28:53 -07:00
|
|
|
|
"linux/proc_task_reader.cc",
|
|
|
|
|
"linux/proc_task_reader.h",
|
2017-12-19 14:21:14 -05:00
|
|
|
|
"linux/ptrace_broker.cc",
|
|
|
|
|
"linux/ptrace_broker.h",
|
|
|
|
|
"linux/ptrace_client.cc",
|
|
|
|
|
"linux/ptrace_client.h",
|
|
|
|
|
"linux/ptrace_connection.h",
|
|
|
|
|
"linux/ptracer.cc",
|
|
|
|
|
"linux/ptracer.h",
|
2018-12-18 09:17:52 -08:00
|
|
|
|
"linux/scoped_pr_set_dumpable.cc",
|
|
|
|
|
"linux/scoped_pr_set_dumpable.h",
|
2018-02-20 13:07:16 -08:00
|
|
|
|
"linux/scoped_pr_set_ptracer.cc",
|
|
|
|
|
"linux/scoped_pr_set_ptracer.h",
|
2017-12-19 14:21:14 -05:00
|
|
|
|
"linux/scoped_ptrace_attach.cc",
|
|
|
|
|
"linux/scoped_ptrace_attach.h",
|
2019-05-02 13:55:08 -07:00
|
|
|
|
"linux/socket.cc",
|
|
|
|
|
"linux/socket.h",
|
2017-12-19 14:21:14 -05:00
|
|
|
|
"linux/thread_info.cc",
|
|
|
|
|
"linux/thread_info.h",
|
|
|
|
|
"linux/traits.h",
|
2018-02-08 16:25:22 -08:00
|
|
|
|
"misc/capture_context_linux.S",
|
2017-12-19 14:21:14 -05:00
|
|
|
|
"misc/paths_linux.cc",
|
2019-11-06 10:00:13 -08:00
|
|
|
|
"misc/time_linux.cc",
|
2017-12-19 14:21:14 -05:00
|
|
|
|
"posix/process_info_linux.cc",
|
|
|
|
|
"process/process_memory_linux.cc",
|
|
|
|
|
"process/process_memory_linux.h",
|
2019-08-14 16:13:35 -07:00
|
|
|
|
"process/process_memory_sanitized.cc",
|
|
|
|
|
"process/process_memory_sanitized.h",
|
2018-01-16 14:46:29 -08:00
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2017-12-19 15:31:04 -08:00
|
|
|
|
if (crashpad_is_win) {
|
2017-11-28 10:31:13 -08:00
|
|
|
|
sources += [
|
|
|
|
|
"file/directory_reader_win.cc",
|
|
|
|
|
"file/file_io_win.cc",
|
|
|
|
|
"file/filesystem_win.cc",
|
|
|
|
|
"misc/clock_win.cc",
|
|
|
|
|
"misc/paths_win.cc",
|
|
|
|
|
"misc/time_win.cc",
|
2018-11-05 13:14:20 -08:00
|
|
|
|
"process/process_memory_win.cc",
|
|
|
|
|
"process/process_memory_win.h",
|
2017-11-28 10:31:13 -08:00
|
|
|
|
"synchronization/semaphore_win.cc",
|
|
|
|
|
"thread/thread_win.cc",
|
|
|
|
|
"win/address_types.h",
|
|
|
|
|
"win/checked_win_address_range.h",
|
|
|
|
|
"win/command_line.cc",
|
|
|
|
|
"win/command_line.h",
|
2018-12-12 12:58:24 -08:00
|
|
|
|
"win/context_wrappers.h",
|
2017-11-28 10:31:13 -08:00
|
|
|
|
"win/critical_section_with_debug_info.cc",
|
|
|
|
|
"win/critical_section_with_debug_info.h",
|
2022-03-14 11:03:06 -04:00
|
|
|
|
"win/exception_codes.h",
|
2017-11-28 10:31:13 -08:00
|
|
|
|
"win/exception_handler_server.cc",
|
|
|
|
|
"win/exception_handler_server.h",
|
|
|
|
|
"win/get_function.cc",
|
|
|
|
|
"win/get_function.h",
|
|
|
|
|
"win/get_module_information.cc",
|
|
|
|
|
"win/get_module_information.h",
|
|
|
|
|
"win/handle.cc",
|
|
|
|
|
"win/handle.h",
|
|
|
|
|
"win/initial_client_data.cc",
|
|
|
|
|
"win/initial_client_data.h",
|
2019-12-03 10:20:34 -08:00
|
|
|
|
"win/loader_lock.cc",
|
|
|
|
|
"win/loader_lock.h",
|
2017-11-28 10:31:13 -08:00
|
|
|
|
"win/module_version.cc",
|
|
|
|
|
"win/module_version.h",
|
|
|
|
|
"win/nt_internals.cc",
|
|
|
|
|
"win/nt_internals.h",
|
|
|
|
|
"win/ntstatus_logging.cc",
|
|
|
|
|
"win/ntstatus_logging.h",
|
|
|
|
|
"win/process_info.cc",
|
|
|
|
|
"win/process_info.h",
|
|
|
|
|
"win/process_structs.h",
|
|
|
|
|
"win/registration_protocol_win.cc",
|
|
|
|
|
"win/registration_protocol_win.h",
|
2022-08-31 13:51:18 -04:00
|
|
|
|
"win/registration_protocol_win_structs.h",
|
2017-11-28 10:31:13 -08:00
|
|
|
|
"win/safe_terminate_process.h",
|
|
|
|
|
"win/scoped_handle.cc",
|
|
|
|
|
"win/scoped_handle.h",
|
|
|
|
|
"win/scoped_local_alloc.cc",
|
|
|
|
|
"win/scoped_local_alloc.h",
|
|
|
|
|
"win/scoped_process_suspend.cc",
|
|
|
|
|
"win/scoped_process_suspend.h",
|
2020-06-23 10:03:31 -04:00
|
|
|
|
"win/scoped_registry_key.h",
|
2017-11-28 10:31:13 -08:00
|
|
|
|
"win/scoped_set_event.cc",
|
|
|
|
|
"win/scoped_set_event.h",
|
|
|
|
|
"win/session_end_watcher.cc",
|
|
|
|
|
"win/session_end_watcher.h",
|
|
|
|
|
"win/termination_codes.h",
|
2020-06-23 10:03:31 -04:00
|
|
|
|
"win/traits.h",
|
2017-11-28 10:31:13 -08:00
|
|
|
|
"win/xp_compat.h",
|
|
|
|
|
]
|
|
|
|
|
|
2022-06-17 07:39:41 -04:00
|
|
|
|
if (current_cpu != "arm64") {
|
2017-11-17 17:48:22 -08:00
|
|
|
|
sources += [
|
2022-06-17 07:39:41 -04:00
|
|
|
|
"misc/capture_context_win.asm",
|
|
|
|
|
"win/safe_terminate_process.asm",
|
2017-11-17 17:48:22 -08:00
|
|
|
|
]
|
2022-06-17 07:39:41 -04:00
|
|
|
|
} else {
|
|
|
|
|
# Most Crashpad builds use Microsoft's armasm64.exe macro assembler for
|
|
|
|
|
# .asm source files. When building in Chromium, clang-cl is used as the
|
|
|
|
|
# assembler instead. Since the two assemblers recognize different
|
|
|
|
|
# assembly dialects, the same .asm file can't be used for each. As a
|
|
|
|
|
# workaround, use a prebuilt .obj file when the Microsoft-dialect
|
|
|
|
|
# assembler isn't available.
|
|
|
|
|
if (crashpad_is_in_chromium) {
|
|
|
|
|
sources += [ "misc/capture_context_win_arm64.obj" ]
|
|
|
|
|
} else {
|
|
|
|
|
sources += [ "misc/capture_context_win_arm64.asm" ]
|
|
|
|
|
}
|
2017-11-17 17:48:22 -08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-12-19 15:31:04 -08:00
|
|
|
|
if (crashpad_is_fuchsia) {
|
2017-12-06 10:08:11 -08:00
|
|
|
|
sources += [
|
2018-04-10 14:25:06 -07:00
|
|
|
|
"fuchsia/koid_utilities.cc",
|
|
|
|
|
"fuchsia/koid_utilities.h",
|
2018-04-13 09:42:19 -07:00
|
|
|
|
"fuchsia/scoped_task_suspend.cc",
|
|
|
|
|
"fuchsia/scoped_task_suspend.h",
|
2020-06-27 00:42:33 -04:00
|
|
|
|
"fuchsia/traits.h",
|
2017-12-06 10:08:11 -08:00
|
|
|
|
"misc/paths_fuchsia.cc",
|
2018-01-16 14:46:29 -08:00
|
|
|
|
"process/process_memory_fuchsia.cc",
|
|
|
|
|
"process/process_memory_fuchsia.h",
|
2017-12-06 10:08:11 -08:00
|
|
|
|
]
|
2023-07-25 17:14:58 +00:00
|
|
|
|
|
|
|
|
|
sources -= [ "misc/capture_context.h" ]
|
2017-12-05 10:52:44 -08:00
|
|
|
|
}
|
|
|
|
|
|
2017-11-28 10:31:13 -08:00
|
|
|
|
public_configs = [ "..:crashpad_config" ]
|
2017-11-17 17:48:22 -08:00
|
|
|
|
|
2017-11-29 18:04:25 -05:00
|
|
|
|
# Include generated files starting with "util".
|
2018-10-11 15:56:22 -07:00
|
|
|
|
if (crashpad_is_in_fuchsia) {
|
2023-01-05 19:30:37 +08:00
|
|
|
|
include_dirs =
|
|
|
|
|
[ "$root_gen_dir/" + rebase_path(fuchsia_crashpad_root, "//") ]
|
2018-10-11 15:56:22 -07:00
|
|
|
|
} else {
|
|
|
|
|
include_dirs = [ "$root_gen_dir/third_party/crashpad/crashpad" ]
|
|
|
|
|
}
|
2017-11-17 17:48:22 -08:00
|
|
|
|
|
2020-01-28 12:02:55 -08:00
|
|
|
|
public_deps = [
|
2020-09-10 14:23:59 -07:00
|
|
|
|
":no_cfi_icall",
|
2020-01-28 12:02:55 -08:00
|
|
|
|
"../compat",
|
2017-11-28 10:31:13 -08:00
|
|
|
|
"../third_party/zlib",
|
2017-11-17 17:48:22 -08:00
|
|
|
|
]
|
|
|
|
|
|
2021-06-28 09:35:07 -04:00
|
|
|
|
deps += [
|
2021-07-28 23:57:54 +00:00
|
|
|
|
"$mini_chromium_source_parent:base",
|
|
|
|
|
"$mini_chromium_source_parent:chromeos_buildflags",
|
2021-06-28 09:35:07 -04:00
|
|
|
|
]
|
2020-01-28 12:02:55 -08:00
|
|
|
|
|
2022-11-03 15:06:18 -07:00
|
|
|
|
configs = [ "../build:flock_always_supported_defines" ]
|
|
|
|
|
|
2023-06-30 11:39:44 -04:00
|
|
|
|
if (crashpad_is_apple) {
|
2022-04-08 16:41:04 +02:00
|
|
|
|
include_dirs += [ "$root_gen_dir" ]
|
2023-06-30 11:39:44 -04:00
|
|
|
|
deps += [
|
|
|
|
|
":mig_output",
|
|
|
|
|
"../build:apple_enable_arc",
|
|
|
|
|
]
|
2022-03-14 11:03:06 -04:00
|
|
|
|
}
|
|
|
|
|
|
2021-08-26 00:13:29 -07:00
|
|
|
|
if (crashpad_is_mac && !crashpad_is_in_fuchsia) {
|
2020-07-01 14:34:38 -04:00
|
|
|
|
libs = [ "bsm" ]
|
|
|
|
|
frameworks = [
|
2017-11-17 17:48:22 -08:00
|
|
|
|
"CoreFoundation.framework",
|
|
|
|
|
"Foundation.framework",
|
|
|
|
|
"IOKit.framework",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2024-02-12 16:23:37 +01:00
|
|
|
|
if (crashpad_is_ios) {
|
|
|
|
|
configs += [ "../build:crashpad_is_ios_app_extension" ]
|
|
|
|
|
}
|
|
|
|
|
|
2017-12-19 15:31:04 -08:00
|
|
|
|
if (crashpad_is_win) {
|
2018-02-06 10:57:23 -08:00
|
|
|
|
libs = [
|
|
|
|
|
"user32.lib",
|
2018-03-09 13:20:09 -08:00
|
|
|
|
|
|
|
|
|
# TODO(jperaza): version.lib is needed for Windows 7 compatibility.
|
|
|
|
|
# mincore.lib may be linked against instead when targeting Windows 8+.
|
|
|
|
|
"version.lib",
|
|
|
|
|
|
2018-02-06 10:57:23 -08:00
|
|
|
|
"winhttp.lib",
|
2017-11-17 17:48:22 -08:00
|
|
|
|
]
|
|
|
|
|
|
2018-02-27 15:29:38 -08:00
|
|
|
|
cflags = [ "/wd4201" ] # nonstandard extension used: nameless struct/union.
|
|
|
|
|
|
2017-11-17 17:48:22 -08:00
|
|
|
|
if (current_cpu == "x86") {
|
|
|
|
|
asmflags = [ "/safeseh" ]
|
|
|
|
|
}
|
|
|
|
|
}
|
2018-07-30 15:50:17 -07:00
|
|
|
|
|
|
|
|
|
if (crashpad_is_fuchsia) {
|
2019-04-05 15:45:15 -07:00
|
|
|
|
public_deps += [ "../third_party/fuchsia" ]
|
2018-07-30 15:50:17 -07:00
|
|
|
|
}
|
2019-05-02 13:55:08 -07:00
|
|
|
|
|
|
|
|
|
if (crashpad_is_android || crashpad_is_linux) {
|
|
|
|
|
deps += [ "../third_party/lss" ]
|
|
|
|
|
}
|
2017-11-17 17:48:22 -08:00
|
|
|
|
}
|
|
|
|
|
|
2021-11-19 13:01:52 -05:00
|
|
|
|
# net is split into a separate target from util so that client code does
|
|
|
|
|
# not have to depend on it.
|
|
|
|
|
crashpad_static_library("net") {
|
|
|
|
|
sources = [
|
|
|
|
|
"net/http_body.cc",
|
|
|
|
|
"net/http_body.h",
|
|
|
|
|
"net/http_body_gzip.cc",
|
|
|
|
|
"net/http_body_gzip.h",
|
|
|
|
|
"net/http_headers.h",
|
|
|
|
|
"net/http_multipart_builder.cc",
|
|
|
|
|
"net/http_multipart_builder.h",
|
|
|
|
|
"net/http_transport.cc",
|
|
|
|
|
"net/http_transport.h",
|
|
|
|
|
"net/url.cc",
|
|
|
|
|
"net/url.h",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
deps = [
|
|
|
|
|
":util",
|
|
|
|
|
"$mini_chromium_source_parent:base",
|
|
|
|
|
]
|
|
|
|
|
|
2023-06-30 11:39:44 -04:00
|
|
|
|
if (crashpad_is_apple) {
|
|
|
|
|
deps += [ "../build:apple_enable_arc" ]
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-19 13:01:52 -05:00
|
|
|
|
if (crashpad_is_mac && !crashpad_is_in_fuchsia) {
|
|
|
|
|
sources += [ "net/http_transport_mac.mm" ]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (crashpad_is_ios) {
|
|
|
|
|
sources += [ "net/http_transport_mac.mm" ]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (crashpad_is_win) {
|
|
|
|
|
sources += [ "net/http_transport_win.cc" ]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (crashpad_http_transport_impl == "socket") {
|
|
|
|
|
sources += [ "net/http_transport_socket.cc" ]
|
|
|
|
|
if (crashpad_use_boringssl_for_http_transport_socket) {
|
2022-01-06 11:43:10 -08:00
|
|
|
|
defines = [ "CRASHPAD_USE_BORINGSSL" ]
|
2021-11-19 13:01:52 -05:00
|
|
|
|
|
|
|
|
|
if (crashpad_is_in_chromium || crashpad_is_in_fuchsia) {
|
|
|
|
|
deps += [ "//third_party/boringssl" ]
|
|
|
|
|
} else {
|
|
|
|
|
libs = [
|
|
|
|
|
"crypto",
|
|
|
|
|
"ssl",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else if (crashpad_http_transport_impl == "libcurl") {
|
|
|
|
|
sources += [ "net/http_transport_libcurl.cc" ]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-15 17:46:45 -04:00
|
|
|
|
if (!crashpad_is_android && !crashpad_is_ios) {
|
2018-05-10 22:58:14 -07:00
|
|
|
|
crashpad_executable("http_transport_test_server") {
|
|
|
|
|
testonly = true
|
2020-01-23 08:00:33 -05:00
|
|
|
|
sources = [ "net/http_transport_test_server.cc" ]
|
2018-04-18 12:49:04 -07:00
|
|
|
|
|
2018-05-10 22:58:14 -07:00
|
|
|
|
deps = [
|
2021-11-19 13:01:52 -05:00
|
|
|
|
":net",
|
2018-05-10 22:58:14 -07:00
|
|
|
|
":util",
|
2021-07-28 23:57:54 +00:00
|
|
|
|
"$mini_chromium_source_parent:base",
|
2021-10-14 10:55:03 -04:00
|
|
|
|
"../third_party/cpp-httplib",
|
2018-05-10 22:58:14 -07:00
|
|
|
|
"../third_party/zlib",
|
|
|
|
|
"../tools:tool_support",
|
2018-04-24 13:02:29 -07:00
|
|
|
|
]
|
2018-04-18 12:49:04 -07:00
|
|
|
|
|
2021-07-28 23:57:54 +00:00
|
|
|
|
# TODO(b/189353575): make these relocatable using $mini_chromium_ variables
|
2018-05-10 22:58:14 -07:00
|
|
|
|
if (crashpad_is_standalone) {
|
2020-09-23 14:39:45 -07:00
|
|
|
|
remove_configs = [ "//third_party/mini_chromium/mini_chromium/build/config:Wexit_time_destructors" ]
|
2020-07-10 17:12:39 -04:00
|
|
|
|
} else if (crashpad_is_external) {
|
2020-09-23 14:39:45 -07:00
|
|
|
|
remove_configs = [ "//../../mini_chromium/mini_chromium/build/config:Wexit_time_destructors" ]
|
2018-05-10 22:58:14 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (crashpad_is_win) {
|
|
|
|
|
libs = [ "ws2_32.lib" ]
|
|
|
|
|
}
|
2018-05-29 12:51:41 -07:00
|
|
|
|
|
2018-08-13 19:24:49 -04:00
|
|
|
|
if (crashpad_use_boringssl_for_http_transport_socket) {
|
2018-05-29 12:51:41 -07:00
|
|
|
|
defines = [ "CRASHPAD_USE_BORINGSSL" ]
|
2018-05-30 15:08:18 -07:00
|
|
|
|
|
2019-10-18 07:28:43 -07:00
|
|
|
|
if (crashpad_is_in_chromium || crashpad_is_in_fuchsia) {
|
2018-06-11 09:38:24 -07:00
|
|
|
|
deps += [ "//third_party/boringssl" ]
|
2018-05-30 15:08:18 -07:00
|
|
|
|
} else {
|
|
|
|
|
libs = [
|
|
|
|
|
"crypto",
|
|
|
|
|
"ssl",
|
|
|
|
|
]
|
|
|
|
|
}
|
2018-05-29 12:51:41 -07:00
|
|
|
|
}
|
2018-04-18 12:49:04 -07:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-09-10 14:23:59 -07:00
|
|
|
|
# This exists as a separate target from util so that compat may depend on it
|
|
|
|
|
# without cycles.
|
|
|
|
|
source_set("no_cfi_icall") {
|
|
|
|
|
sources = [ "misc/no_cfi_icall.h" ]
|
|
|
|
|
public_configs = [ "..:crashpad_config" ]
|
2024-08-28 14:43:27 -07:00
|
|
|
|
public_deps = [
|
|
|
|
|
"$mini_chromium_source_parent:base",
|
|
|
|
|
"$mini_chromium_source_parent:build",
|
|
|
|
|
]
|
2020-09-10 14:23:59 -07:00
|
|
|
|
}
|
|
|
|
|
|
2017-11-17 17:48:22 -08:00
|
|
|
|
source_set("util_test") {
|
|
|
|
|
testonly = true
|
|
|
|
|
|
|
|
|
|
sources = [
|
|
|
|
|
"file/delimited_file_reader_test.cc",
|
|
|
|
|
"file/directory_reader_test.cc",
|
|
|
|
|
"file/file_io_test.cc",
|
|
|
|
|
"file/file_reader_test.cc",
|
|
|
|
|
"file/filesystem_test.cc",
|
|
|
|
|
"file/string_file_test.cc",
|
2019-01-03 13:36:02 -05:00
|
|
|
|
"misc/arraysize_test.cc",
|
2018-04-06 15:13:03 -07:00
|
|
|
|
"misc/capture_context_test.cc",
|
2018-02-08 16:25:22 -08:00
|
|
|
|
"misc/capture_context_test_util.h",
|
2017-11-17 17:48:22 -08:00
|
|
|
|
"misc/clock_test.cc",
|
|
|
|
|
"misc/from_pointer_cast_test.cc",
|
|
|
|
|
"misc/initialization_state_dcheck_test.cc",
|
|
|
|
|
"misc/initialization_state_test.cc",
|
2020-09-10 14:23:59 -07:00
|
|
|
|
"misc/no_cfi_icall_test.cc",
|
2017-11-17 17:48:22 -08:00
|
|
|
|
"misc/paths_test.cc",
|
|
|
|
|
"misc/random_string_test.cc",
|
2018-06-11 09:38:24 -07:00
|
|
|
|
"misc/range_set_test.cc",
|
2017-11-17 17:48:22 -08:00
|
|
|
|
"misc/reinterpret_bytes_test.cc",
|
|
|
|
|
"misc/scoped_forbid_return_test.cc",
|
|
|
|
|
"misc/time_test.cc",
|
|
|
|
|
"misc/uuid_test.cc",
|
|
|
|
|
"net/http_body_gzip_test.cc",
|
|
|
|
|
"net/http_body_test.cc",
|
|
|
|
|
"net/http_body_test_util.cc",
|
|
|
|
|
"net/http_body_test_util.h",
|
|
|
|
|
"net/http_multipart_builder_test.cc",
|
|
|
|
|
"net/url_test.cc",
|
|
|
|
|
"numeric/checked_address_range_test.cc",
|
|
|
|
|
"numeric/checked_range_test.cc",
|
|
|
|
|
"numeric/in_range_cast_test.cc",
|
|
|
|
|
"numeric/int128_test.cc",
|
2018-12-20 11:12:51 -08:00
|
|
|
|
"process/process_memory_range_test.cc",
|
|
|
|
|
"process/process_memory_test.cc",
|
2017-11-17 17:48:22 -08:00
|
|
|
|
"stdlib/aligned_allocator_test.cc",
|
|
|
|
|
"stdlib/map_insert_test.cc",
|
|
|
|
|
"stdlib/string_number_conversion_test.cc",
|
|
|
|
|
"stdlib/strlcpy_test.cc",
|
|
|
|
|
"stdlib/strnlen_test.cc",
|
|
|
|
|
"stdlib/thread_safe_vector_test.cc",
|
2019-12-06 10:54:44 -08:00
|
|
|
|
"stream/base94_output_stream_test.cc",
|
2019-12-18 11:33:39 -08:00
|
|
|
|
"stream/file_encoder_test.cc",
|
2019-12-12 13:15:05 -08:00
|
|
|
|
"stream/log_output_stream_test.cc",
|
2019-09-05 17:53:01 -07:00
|
|
|
|
"stream/test_output_stream.cc",
|
|
|
|
|
"stream/test_output_stream.h",
|
|
|
|
|
"stream/zlib_output_stream_test.cc",
|
2017-11-17 17:48:22 -08:00
|
|
|
|
"string/split_string_test.cc",
|
2022-12-14 14:02:29 -07:00
|
|
|
|
"synchronization/scoped_spin_guard_test.cc",
|
2017-11-17 17:48:22 -08:00
|
|
|
|
"synchronization/semaphore_test.cc",
|
|
|
|
|
"thread/thread_log_messages_test.cc",
|
|
|
|
|
"thread/thread_test.cc",
|
|
|
|
|
"thread/worker_thread_test.cc",
|
|
|
|
|
]
|
|
|
|
|
|
2020-04-15 17:46:45 -04:00
|
|
|
|
if (!crashpad_is_android && !crashpad_is_ios) {
|
2018-04-26 17:21:45 -07:00
|
|
|
|
# Android requires an HTTPTransport implementation.
|
2017-12-05 15:16:08 -08:00
|
|
|
|
sources += [ "net/http_transport_test.cc" ]
|
|
|
|
|
}
|
|
|
|
|
|
2018-04-04 15:12:50 -07:00
|
|
|
|
if (crashpad_is_posix || crashpad_is_fuchsia) {
|
2020-04-15 17:46:45 -04:00
|
|
|
|
if (!crashpad_is_fuchsia && !crashpad_is_ios) {
|
2017-12-05 15:16:08 -08:00
|
|
|
|
sources += [
|
|
|
|
|
"posix/process_info_test.cc",
|
|
|
|
|
"posix/signals_test.cc",
|
|
|
|
|
"posix/symbolic_constants_posix_test.cc",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
sources += [ "posix/scoped_mmap_test.cc" ]
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-30 11:39:44 -04:00
|
|
|
|
if (crashpad_is_apple) {
|
2020-04-17 11:29:09 -04:00
|
|
|
|
sources += [
|
|
|
|
|
"mac/xattr_test.cc",
|
2020-04-21 11:59:44 -04:00
|
|
|
|
"mach/composite_mach_message_server_test.cc",
|
|
|
|
|
"mach/exc_server_variants_test.cc",
|
ios: Build four more Mach message and exception utilities
This enables the following code in util/mach on iOS:
- exception_behaviors.{cc,h}
- exception_ports.{cc,h}
- mach_message.{cc,h}
- mach_message_server.{cc,h}
Only the ExceptionBehaviors and MachMessage tests are built, because the
other two are tested by multiprocess tests that won’t run on iOS.
The AuditPIDFromMachMessageTrailer function from mach_message.h is
excluded on iOS because it relies on <bsm/libbsm.h>, which is broken on
iOS: it depends on <bsm/audit_record.h>, which is missing from the SDK.
Additionally, the BSM function that Crashpad uses, audit_token_to_au32,
is marked as unavailable on iOS. Crashpad uses it on macOS to
authenticate Mach messages sent by other processes, but this is moot on
iOS.
Bug: crashpad:31
Change-Id: I5ebc4b80543989b9cd0b85b82eb4b3ff98c44e6c
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2155086
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2020-04-17 17:45:18 -04:00
|
|
|
|
"mach/exception_behaviors_test.cc",
|
2020-04-17 11:29:09 -04:00
|
|
|
|
"mach/mach_extensions_test.cc",
|
ios: Build four more Mach message and exception utilities
This enables the following code in util/mach on iOS:
- exception_behaviors.{cc,h}
- exception_ports.{cc,h}
- mach_message.{cc,h}
- mach_message_server.{cc,h}
Only the ExceptionBehaviors and MachMessage tests are built, because the
other two are tested by multiprocess tests that won’t run on iOS.
The AuditPIDFromMachMessageTrailer function from mach_message.h is
excluded on iOS because it relies on <bsm/libbsm.h>, which is broken on
iOS: it depends on <bsm/audit_record.h>, which is missing from the SDK.
Additionally, the BSM function that Crashpad uses, audit_token_to_au32,
is marked as unavailable on iOS. Crashpad uses it on macOS to
authenticate Mach messages sent by other processes, but this is moot on
iOS.
Bug: crashpad:31
Change-Id: I5ebc4b80543989b9cd0b85b82eb4b3ff98c44e6c
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2155086
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
2020-04-17 17:45:18 -04:00
|
|
|
|
"mach/mach_message_test.cc",
|
2020-04-28 11:52:14 -04:00
|
|
|
|
"mach/symbolic_constants_mach_test.cc",
|
2020-05-03 15:06:51 -04:00
|
|
|
|
"misc/capture_context_test_util_mac.cc",
|
2020-04-17 11:29:09 -04:00
|
|
|
|
]
|
2020-04-17 10:37:15 -04:00
|
|
|
|
}
|
|
|
|
|
|
2017-12-19 15:31:04 -08:00
|
|
|
|
if (crashpad_is_mac) {
|
2017-11-17 17:48:22 -08:00
|
|
|
|
sources += [
|
2017-11-28 10:31:13 -08:00
|
|
|
|
"mac/launchd_test.mm",
|
|
|
|
|
"mac/mac_util_test.mm",
|
|
|
|
|
"mac/service_management_test.mm",
|
2020-09-01 17:09:37 -04:00
|
|
|
|
"mac/sysctl_test.cc",
|
2020-04-17 11:29:09 -04:00
|
|
|
|
"mach/bootstrap_test.cc",
|
2017-11-17 17:48:22 -08:00
|
|
|
|
"mach/child_port_handshake_test.cc",
|
|
|
|
|
"mach/child_port_server_test.cc",
|
|
|
|
|
"mach/exc_client_variants_test.cc",
|
|
|
|
|
"mach/exception_ports_test.cc",
|
|
|
|
|
"mach/exception_types_test.cc",
|
|
|
|
|
"mach/mach_message_server_test.cc",
|
|
|
|
|
"mach/notify_server_test.cc",
|
|
|
|
|
"mach/scoped_task_suspend_test.cc",
|
2018-12-20 13:12:55 -08:00
|
|
|
|
"process/process_memory_mac_test.cc",
|
2017-11-17 17:48:22 -08:00
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-15 17:46:45 -04:00
|
|
|
|
if (crashpad_is_ios) {
|
2021-05-07 14:32:20 -04:00
|
|
|
|
sources += [
|
ios: Add support for intermediate dump reader and writer.
Due to the limitations of in-process handling, an intermediate dump file
is written during exceptions. The data is streamed to a file using only
in-process safe methods. The file format is similar to binary JSON,
supporting keyed properties, maps and arrays.
- Property [key:int, length:int, value:intarray]
- StartMap [key:int], followed by repeating Properties until EndMap
- StartArray [key:int], followed by repeating Maps until EndArray
- EndMap, EndArray, EndDocument
Similar to JSON, maps can contain other maps, arrays and properties.
Once loaded, the binary file is read into a set of data structures that
expose the data, maps and arrays.
Bug: crashpad: 31
Change-Id: I43a19204935303afd753c8c7090c54099634ccd6
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2870807
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Justin Cohen <justincohen@chromium.org>
2021-05-20 11:10:34 -04:00
|
|
|
|
"ios/ios_intermediate_dump_reader_test.cc",
|
|
|
|
|
"ios/ios_intermediate_dump_writer_test.cc",
|
2023-01-30 15:02:31 -07:00
|
|
|
|
"ios/scoped_vm_map_test.cc",
|
2023-06-30 11:39:44 -04:00
|
|
|
|
"ios/scoped_vm_read_test.cc",
|
2021-05-07 14:32:20 -04:00
|
|
|
|
]
|
2020-04-15 17:46:45 -04:00
|
|
|
|
|
|
|
|
|
sources -= [
|
|
|
|
|
"process/process_memory_range_test.cc",
|
|
|
|
|
"process/process_memory_test.cc",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
2017-12-21 17:54:12 -05:00
|
|
|
|
if (crashpad_is_linux || crashpad_is_android) {
|
2017-12-19 14:21:14 -05:00
|
|
|
|
sources += [
|
|
|
|
|
"linux/auxiliary_vector_test.cc",
|
|
|
|
|
"linux/memory_map_test.cc",
|
|
|
|
|
"linux/proc_stat_reader_test.cc",
|
2019-04-29 14:28:53 -07:00
|
|
|
|
"linux/proc_task_reader_test.cc",
|
2017-12-19 14:21:14 -05:00
|
|
|
|
"linux/ptrace_broker_test.cc",
|
|
|
|
|
"linux/ptracer_test.cc",
|
|
|
|
|
"linux/scoped_ptrace_attach_test.cc",
|
2019-05-02 13:55:08 -07:00
|
|
|
|
"linux/socket_test.cc",
|
2018-02-08 16:25:22 -08:00
|
|
|
|
"misc/capture_context_test_util_linux.cc",
|
2019-08-14 16:13:35 -07:00
|
|
|
|
"process/process_memory_sanitized_test.cc",
|
2018-01-16 14:46:29 -08:00
|
|
|
|
]
|
|
|
|
|
}
|
2017-12-19 14:21:14 -05:00
|
|
|
|
|
2018-04-06 15:13:03 -07:00
|
|
|
|
if (crashpad_is_fuchsia) {
|
2023-07-25 17:14:58 +00:00
|
|
|
|
sources -= [
|
|
|
|
|
"misc/capture_context_test.cc",
|
|
|
|
|
"misc/capture_context_test_util.h",
|
|
|
|
|
]
|
2018-04-06 15:13:03 -07:00
|
|
|
|
}
|
|
|
|
|
|
2017-12-19 15:31:04 -08:00
|
|
|
|
if (crashpad_is_win) {
|
2017-11-28 10:31:13 -08:00
|
|
|
|
sources += [
|
2018-02-08 16:25:22 -08:00
|
|
|
|
"misc/capture_context_test_util_win.cc",
|
2017-11-28 10:31:13 -08:00
|
|
|
|
"win/command_line_test.cc",
|
|
|
|
|
"win/critical_section_with_debug_info_test.cc",
|
|
|
|
|
"win/exception_handler_server_test.cc",
|
|
|
|
|
"win/get_function_test.cc",
|
|
|
|
|
"win/handle_test.cc",
|
|
|
|
|
"win/initial_client_data_test.cc",
|
2019-12-03 10:20:34 -08:00
|
|
|
|
"win/loader_lock_test.cc",
|
2017-11-28 10:31:13 -08:00
|
|
|
|
"win/process_info_test.cc",
|
|
|
|
|
"win/registration_protocol_win_test.cc",
|
|
|
|
|
"win/safe_terminate_process_test.cc",
|
|
|
|
|
"win/scoped_process_suspend_test.cc",
|
|
|
|
|
"win/session_end_watcher_test.cc",
|
|
|
|
|
]
|
2018-08-29 09:33:25 -07:00
|
|
|
|
|
2018-09-26 17:54:38 +02:00
|
|
|
|
if (crashpad_is_in_chromium && is_asan && is_component_build) {
|
2018-08-29 09:33:25 -07:00
|
|
|
|
# TODO(crbug.com/856174): Re-enable these once Windows ASan is fixed.
|
|
|
|
|
sources -= [ "stdlib/string_number_conversion_test.cc" ]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-17 10:37:15 -04:00
|
|
|
|
data = [
|
|
|
|
|
"net/testdata/ascii_http_body.txt",
|
|
|
|
|
"net/testdata/binary_http_body.dat",
|
|
|
|
|
"net/testdata/crashpad_util_test_cert.pem",
|
|
|
|
|
"net/testdata/crashpad_util_test_key.pem",
|
|
|
|
|
]
|
2017-11-17 17:48:22 -08:00
|
|
|
|
|
|
|
|
|
deps = [
|
2021-11-19 13:01:52 -05:00
|
|
|
|
":net",
|
2017-11-17 17:48:22 -08:00
|
|
|
|
":util",
|
2021-10-14 10:55:03 -04:00
|
|
|
|
"$mini_chromium_source_parent:base",
|
2017-11-28 10:31:13 -08:00
|
|
|
|
"../client",
|
|
|
|
|
"../compat",
|
|
|
|
|
"../test",
|
2020-05-06 20:39:19 -04:00
|
|
|
|
"../third_party/googletest:googlemock",
|
|
|
|
|
"../third_party/googletest:googletest",
|
2017-11-28 10:31:13 -08:00
|
|
|
|
"../third_party/zlib",
|
2017-11-17 17:48:22 -08:00
|
|
|
|
]
|
|
|
|
|
|
2020-04-15 17:46:45 -04:00
|
|
|
|
if (!crashpad_is_android && !crashpad_is_ios) {
|
2020-01-23 08:00:33 -05:00
|
|
|
|
data_deps = [ ":http_transport_test_server" ]
|
2018-05-29 12:51:41 -07:00
|
|
|
|
|
2018-08-13 19:24:49 -04:00
|
|
|
|
if (crashpad_use_boringssl_for_http_transport_socket) {
|
2018-05-29 12:51:41 -07:00
|
|
|
|
defines = [ "CRASHPAD_USE_BORINGSSL" ]
|
|
|
|
|
}
|
2018-05-10 22:58:14 -07:00
|
|
|
|
}
|
2018-04-18 12:49:04 -07:00
|
|
|
|
|
2023-06-30 11:39:44 -04:00
|
|
|
|
if (crashpad_is_apple) {
|
|
|
|
|
deps += [ "../build:apple_enable_arc" ]
|
|
|
|
|
}
|
|
|
|
|
|
2017-12-19 15:31:04 -08:00
|
|
|
|
if (crashpad_is_mac) {
|
2020-07-01 14:34:38 -04:00
|
|
|
|
frameworks = [ "Foundation.framework" ]
|
2017-11-17 17:48:22 -08:00
|
|
|
|
}
|
|
|
|
|
|
2020-04-17 10:37:15 -04:00
|
|
|
|
if (crashpad_is_ios) {
|
|
|
|
|
deps += [ ":util_test_bundle_data" ]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (crashpad_is_android || crashpad_is_linux) {
|
|
|
|
|
deps += [ "../third_party/lss" ]
|
|
|
|
|
}
|
|
|
|
|
|
2017-12-19 15:31:04 -08:00
|
|
|
|
if (crashpad_is_win) {
|
2018-02-06 10:57:23 -08:00
|
|
|
|
libs = [
|
|
|
|
|
"rpcrt4.lib",
|
|
|
|
|
"dbghelp.lib",
|
|
|
|
|
]
|
2018-04-18 12:49:04 -07:00
|
|
|
|
data_deps += [
|
2019-12-03 10:20:34 -08:00
|
|
|
|
":crashpad_util_test_loader_lock_test",
|
2017-11-17 17:48:22 -08:00
|
|
|
|
":crashpad_util_test_process_info_test_child",
|
|
|
|
|
":crashpad_util_test_safe_terminate_process_test_child",
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-04-17 10:37:15 -04:00
|
|
|
|
if (crashpad_is_ios) {
|
|
|
|
|
bundle_data("util_test_bundle_data") {
|
|
|
|
|
testonly = true
|
|
|
|
|
|
|
|
|
|
sources = [
|
|
|
|
|
"net/testdata/ascii_http_body.txt",
|
|
|
|
|
"net/testdata/binary_http_body.dat",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
outputs = [ "{{bundle_resources_dir}}/crashpad_test_data/" +
|
|
|
|
|
"{{source_root_relative_dir}}/{{source_file_part}}" ]
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2017-12-19 15:31:04 -08:00
|
|
|
|
if (crashpad_is_win) {
|
2018-03-21 19:18:07 -07:00
|
|
|
|
crashpad_executable("crashpad_util_test_process_info_test_child") {
|
2017-11-17 17:48:22 -08:00
|
|
|
|
testonly = true
|
2020-01-23 08:00:33 -05:00
|
|
|
|
sources = [ "win/process_info_test_child.cc" ]
|
2017-11-17 17:48:22 -08:00
|
|
|
|
}
|
|
|
|
|
|
2018-03-21 19:18:07 -07:00
|
|
|
|
crashpad_executable("crashpad_util_test_safe_terminate_process_test_child") {
|
2017-11-17 17:48:22 -08:00
|
|
|
|
testonly = true
|
2020-01-23 08:00:33 -05:00
|
|
|
|
sources = [ "win/safe_terminate_process_test_child.cc" ]
|
2017-11-17 17:48:22 -08:00
|
|
|
|
}
|
2019-12-03 10:20:34 -08:00
|
|
|
|
|
|
|
|
|
crashpad_loadable_module("crashpad_util_test_loader_lock_test") {
|
|
|
|
|
testonly = true
|
2020-01-23 08:00:33 -05:00
|
|
|
|
sources = [ "win/loader_lock_test_dll.cc" ]
|
|
|
|
|
deps = [ ":util" ]
|
2019-12-03 10:20:34 -08:00
|
|
|
|
}
|
2017-11-17 17:48:22 -08:00
|
|
|
|
}
|