crashpad/handler/BUILD.gn

392 lines
9.3 KiB
Plaintext
Raw Normal View History

# Copyright 2015 The Crashpad Authors
#
# 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.
import("../build/crashpad_buildconfig.gni")
static_library("handler") {
sources = [
"handler_main.cc",
"handler_main.h",
"prune_crash_reports_thread.cc",
"prune_crash_reports_thread.h",
"user_stream_data_source.cc",
"user_stream_data_source.h",
]
if (crashpad_is_mac) {
Rework GN files to start to support building standalone, and also in Chromium - Adds a .gn and a build/BUILDCONFIG.gn that uses mini_chromium's build/BUILD.gn. - Adds some stub BUILD.gn files in locations where Chromium expects them (in //build, //testing, //third_party) containing empty targets/configs. These are no-ops in standalone builds, but add functionality when building in Chromium. This is in preference to having a global bool that conditionally does Chromium-y things in the Crashpad build files. These stub files are all contained in a secondary source root in build/chromium_compatibility, referred to by //.gn. - Adds //base/BUILD.gn which forwards to mini_chromium/base. This is only used when building standalone so that both Chromium and Crashpad can refer to it as "//base". - Changes references to other Crashpad targets to be relatively specified so that they work when the root of the project is //, and also when it's //third_party/crashpad/crashpad as it is in Chromium. - Moves any error-causing Mac/Win-specific files into explicit if (is_mac) or if (is_win) blocks as part of removing the dependency on set_sources_assignment_filter(). As yet unresolved: - CRASHPAD_IN_CHROMIUM needs to be removed when standalone; to be tackled in a follow up. - Not sure what to do with zlib yet, the build file currently assumes "in Chromium" too, and similarly having Crashpad //third_party/zlib:zlib pointing at itself doesn't work. Bug: crashpad:79 Change-Id: I6a7dda214e4b3b14a60c1ed285267ab97432a1a8 Reviewed-on: https://chromium-review.googlesource.com/777410 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org>
2017-11-28 10:31:13 -08:00
sources += [
"mac/crash_report_exception_handler.cc",
"mac/crash_report_exception_handler.h",
"mac/exception_handler_server.cc",
"mac/exception_handler_server.h",
]
}
if (crashpad_is_linux || crashpad_is_android) {
sources += [
"linux/capture_snapshot.cc",
"linux/capture_snapshot.h",
"linux/crash_report_exception_handler.cc",
"linux/crash_report_exception_handler.h",
"linux/exception_handler_server.cc",
"linux/exception_handler_server.h",
]
}
if (crashpad_is_linux) {
sources += [
"linux/cros_crash_report_exception_handler.cc",
"linux/cros_crash_report_exception_handler.h",
]
# TODO(https://crbug.com/1420445): Remove this config when M115 branches.
configs += [ "../build:crashpad_is_in_chromium" ]
}
if (crashpad_is_win) {
Rework GN files to start to support building standalone, and also in Chromium - Adds a .gn and a build/BUILDCONFIG.gn that uses mini_chromium's build/BUILD.gn. - Adds some stub BUILD.gn files in locations where Chromium expects them (in //build, //testing, //third_party) containing empty targets/configs. These are no-ops in standalone builds, but add functionality when building in Chromium. This is in preference to having a global bool that conditionally does Chromium-y things in the Crashpad build files. These stub files are all contained in a secondary source root in build/chromium_compatibility, referred to by //.gn. - Adds //base/BUILD.gn which forwards to mini_chromium/base. This is only used when building standalone so that both Chromium and Crashpad can refer to it as "//base". - Changes references to other Crashpad targets to be relatively specified so that they work when the root of the project is //, and also when it's //third_party/crashpad/crashpad as it is in Chromium. - Moves any error-causing Mac/Win-specific files into explicit if (is_mac) or if (is_win) blocks as part of removing the dependency on set_sources_assignment_filter(). As yet unresolved: - CRASHPAD_IN_CHROMIUM needs to be removed when standalone; to be tackled in a follow up. - Not sure what to do with zlib yet, the build file currently assumes "in Chromium" too, and similarly having Crashpad //third_party/zlib:zlib pointing at itself doesn't work. Bug: crashpad:79 Change-Id: I6a7dda214e4b3b14a60c1ed285267ab97432a1a8 Reviewed-on: https://chromium-review.googlesource.com/777410 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org>
2017-11-28 10:31:13 -08:00
sources += [
"win/crash_report_exception_handler.cc",
"win/crash_report_exception_handler.h",
]
}
public_configs = [ "..:crashpad_config" ]
public_deps = [
":common",
Rework GN files to start to support building standalone, and also in Chromium - Adds a .gn and a build/BUILDCONFIG.gn that uses mini_chromium's build/BUILD.gn. - Adds some stub BUILD.gn files in locations where Chromium expects them (in //build, //testing, //third_party) containing empty targets/configs. These are no-ops in standalone builds, but add functionality when building in Chromium. This is in preference to having a global bool that conditionally does Chromium-y things in the Crashpad build files. These stub files are all contained in a secondary source root in build/chromium_compatibility, referred to by //.gn. - Adds //base/BUILD.gn which forwards to mini_chromium/base. This is only used when building standalone so that both Chromium and Crashpad can refer to it as "//base". - Changes references to other Crashpad targets to be relatively specified so that they work when the root of the project is //, and also when it's //third_party/crashpad/crashpad as it is in Chromium. - Moves any error-causing Mac/Win-specific files into explicit if (is_mac) or if (is_win) blocks as part of removing the dependency on set_sources_assignment_filter(). As yet unresolved: - CRASHPAD_IN_CHROMIUM needs to be removed when standalone; to be tackled in a follow up. - Not sure what to do with zlib yet, the build file currently assumes "in Chromium" too, and similarly having Crashpad //third_party/zlib:zlib pointing at itself doesn't work. Bug: crashpad:79 Change-Id: I6a7dda214e4b3b14a60c1ed285267ab97432a1a8 Reviewed-on: https://chromium-review.googlesource.com/777410 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org>
2017-11-28 10:31:13 -08:00
"../client",
"../third_party/mini_chromium:base",
"../util",
]
deps = [
":common",
Rework GN files to start to support building standalone, and also in Chromium - Adds a .gn and a build/BUILDCONFIG.gn that uses mini_chromium's build/BUILD.gn. - Adds some stub BUILD.gn files in locations where Chromium expects them (in //build, //testing, //third_party) containing empty targets/configs. These are no-ops in standalone builds, but add functionality when building in Chromium. This is in preference to having a global bool that conditionally does Chromium-y things in the Crashpad build files. These stub files are all contained in a secondary source root in build/chromium_compatibility, referred to by //.gn. - Adds //base/BUILD.gn which forwards to mini_chromium/base. This is only used when building standalone so that both Chromium and Crashpad can refer to it as "//base". - Changes references to other Crashpad targets to be relatively specified so that they work when the root of the project is //, and also when it's //third_party/crashpad/crashpad as it is in Chromium. - Moves any error-causing Mac/Win-specific files into explicit if (is_mac) or if (is_win) blocks as part of removing the dependency on set_sources_assignment_filter(). As yet unresolved: - CRASHPAD_IN_CHROMIUM needs to be removed when standalone; to be tackled in a follow up. - Not sure what to do with zlib yet, the build file currently assumes "in Chromium" too, and similarly having Crashpad //third_party/zlib:zlib pointing at itself doesn't work. Bug: crashpad:79 Change-Id: I6a7dda214e4b3b14a60c1ed285267ab97432a1a8 Reviewed-on: https://chromium-review.googlesource.com/777410 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org>
2017-11-28 10:31:13 -08:00
"../minidump",
"../snapshot",
"../third_party/mini_chromium:chromeos_buildflags",
Rework GN files to start to support building standalone, and also in Chromium - Adds a .gn and a build/BUILDCONFIG.gn that uses mini_chromium's build/BUILD.gn. - Adds some stub BUILD.gn files in locations where Chromium expects them (in //build, //testing, //third_party) containing empty targets/configs. These are no-ops in standalone builds, but add functionality when building in Chromium. This is in preference to having a global bool that conditionally does Chromium-y things in the Crashpad build files. These stub files are all contained in a secondary source root in build/chromium_compatibility, referred to by //.gn. - Adds //base/BUILD.gn which forwards to mini_chromium/base. This is only used when building standalone so that both Chromium and Crashpad can refer to it as "//base". - Changes references to other Crashpad targets to be relatively specified so that they work when the root of the project is //, and also when it's //third_party/crashpad/crashpad as it is in Chromium. - Moves any error-causing Mac/Win-specific files into explicit if (is_mac) or if (is_win) blocks as part of removing the dependency on set_sources_assignment_filter(). As yet unresolved: - CRASHPAD_IN_CHROMIUM needs to be removed when standalone; to be tackled in a follow up. - Not sure what to do with zlib yet, the build file currently assumes "in Chromium" too, and similarly having Crashpad //third_party/zlib:zlib pointing at itself doesn't work. Bug: crashpad:79 Change-Id: I6a7dda214e4b3b14a60c1ed285267ab97432a1a8 Reviewed-on: https://chromium-review.googlesource.com/777410 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org>
2017-11-28 10:31:13 -08:00
"../tools:tool_support",
]
if (crashpad_is_win) {
cflags = [ "/wd4201" ] # nonstandard extension used : nameless struct/union
}
}
if (crashpad_is_android) {
# CrashpadHandlerMain is defined in a separate target so that it can be
# overriden by implementers
source_set("crashpad_handler_main") {
sources = [ "crashpad_handler_main.cc" ]
deps = [ ":handler" ]
}
}
static_library("common") {
sources = [
"crash_report_upload_thread.cc",
"crash_report_upload_thread.h",
"minidump_to_upload_parameters.cc",
"minidump_to_upload_parameters.h",
]
if (crashpad_is_apple) {
sources += [
"mac/file_limit_annotation.cc",
"mac/file_limit_annotation.h",
]
}
public_configs = [ "..:crashpad_config" ]
public_deps = [
"../third_party/mini_chromium:base",
"../util",
]
deps = [
"../client:common",
"../snapshot",
"../util",
"../util:net",
]
if (crashpad_is_win) {
cflags = [ "/wd4201" ] # nonstandard extension used : nameless struct/union
}
}
source_set("handler_test") {
testonly = true
sources = [ "minidump_to_upload_parameters_test.cc" ]
if (crashpad_is_linux || crashpad_is_android) {
sources += [ "linux/exception_handler_server_test.cc" ]
}
if (crashpad_is_win) {
sources += [ "crashpad_handler_test.cc" ]
}
deps = [
":handler",
Rework GN files to start to support building standalone, and also in Chromium - Adds a .gn and a build/BUILDCONFIG.gn that uses mini_chromium's build/BUILD.gn. - Adds some stub BUILD.gn files in locations where Chromium expects them (in //build, //testing, //third_party) containing empty targets/configs. These are no-ops in standalone builds, but add functionality when building in Chromium. This is in preference to having a global bool that conditionally does Chromium-y things in the Crashpad build files. These stub files are all contained in a secondary source root in build/chromium_compatibility, referred to by //.gn. - Adds //base/BUILD.gn which forwards to mini_chromium/base. This is only used when building standalone so that both Chromium and Crashpad can refer to it as "//base". - Changes references to other Crashpad targets to be relatively specified so that they work when the root of the project is //, and also when it's //third_party/crashpad/crashpad as it is in Chromium. - Moves any error-causing Mac/Win-specific files into explicit if (is_mac) or if (is_win) blocks as part of removing the dependency on set_sources_assignment_filter(). As yet unresolved: - CRASHPAD_IN_CHROMIUM needs to be removed when standalone; to be tackled in a follow up. - Not sure what to do with zlib yet, the build file currently assumes "in Chromium" too, and similarly having Crashpad //third_party/zlib:zlib pointing at itself doesn't work. Bug: crashpad:79 Change-Id: I6a7dda214e4b3b14a60c1ed285267ab97432a1a8 Reviewed-on: https://chromium-review.googlesource.com/777410 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org>
2017-11-28 10:31:13 -08:00
"../client",
"../compat",
"../snapshot",
"../snapshot:test_support",
Rework GN files to start to support building standalone, and also in Chromium - Adds a .gn and a build/BUILDCONFIG.gn that uses mini_chromium's build/BUILD.gn. - Adds some stub BUILD.gn files in locations where Chromium expects them (in //build, //testing, //third_party) containing empty targets/configs. These are no-ops in standalone builds, but add functionality when building in Chromium. This is in preference to having a global bool that conditionally does Chromium-y things in the Crashpad build files. These stub files are all contained in a secondary source root in build/chromium_compatibility, referred to by //.gn. - Adds //base/BUILD.gn which forwards to mini_chromium/base. This is only used when building standalone so that both Chromium and Crashpad can refer to it as "//base". - Changes references to other Crashpad targets to be relatively specified so that they work when the root of the project is //, and also when it's //third_party/crashpad/crashpad as it is in Chromium. - Moves any error-causing Mac/Win-specific files into explicit if (is_mac) or if (is_win) blocks as part of removing the dependency on set_sources_assignment_filter(). As yet unresolved: - CRASHPAD_IN_CHROMIUM needs to be removed when standalone; to be tackled in a follow up. - Not sure what to do with zlib yet, the build file currently assumes "in Chromium" too, and similarly having Crashpad //third_party/zlib:zlib pointing at itself doesn't work. Bug: crashpad:79 Change-Id: I6a7dda214e4b3b14a60c1ed285267ab97432a1a8 Reviewed-on: https://chromium-review.googlesource.com/777410 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org>
2017-11-28 10:31:13 -08:00
"../test",
Update gtest to e3f0319d89f4cbf32993de595d984183b1a9fc57 I’m most interested in picking up 1b3eb6ef3462, “Explicitly define copy constructors used in googletest tests.” This also reorganizes files and rewrites text to refer to this project as Google Test and googletest (and Google Mock and googlemock), as it prefers to be known. Some filenames are left at gtest_* following the precedent set by gtest itself. For example, #include "gtest/gtest.h" is still used, so #include "test/gtest_death.h" is retained too. gtest_all_test OutputFileHelpersTest.GetCurrentExecutableName hard-codes the expected executable name as gtest_all_test among other options that do not include googletest_all_test, so test executables retain their names as well. fb19f57880f6 Add GTEST_BRIEF option 3549237957a1 Ensure that gtest/gmock pkgconfig requirements specify version 189299e957bb Merge branch 'master' into quiet-flag 5504ded3ab5c Fix a typo in .travis.yml 6ed4e7168f54 Replace the last instance of `throw()` with `noexcept`. NFC 879fd9b45299 Remove duplicate codes existed in get-nprocessors.sh 644f3a992c28 gtest-unittest-api_test - fix warning in clang build 0b6d567619fe Remove redundant .c_str() be3ac45cf673 fix signed/unsigned comparison issue (on OpenBSD) b51a49e0cb82 Merge pull request #2773 from Quuxplusone:replace-noexcept c2032090f373 Merge pull request #2772 from Quuxplusone:travis 4fe5ac53337e Merge pull request #2756 from Conan-Kudo:fix-pkgconfig-reqs 373d72b6986f Googletest export 4c8e6a9fe1c8 Merge pull request #2810 from ptahmose:master 71d5df6c6b67 Merge pull request #2802 from e-i-n-s:fix_clang_warning dcc92d0ab6c4 Merge pull request #2805 from pepsiman:patch-1 4f002f1e236c VariadicMatcher needs a non-defaulted move constructor for compile-time performance 9d580ea80592 Enable protobuf printing for open-source proto messages 766ac2e1a413 Remove all uses of GTEST_DISALLOW_{MOVE_,}ASSIGN_ 11b3cec177b1 Fix a -Wdeprecated warning 01c0ff5e2373 Fix a -Wdeprecated warning c7d8ec72cc4b Fix a -Wdeprecated warning 1b066f4edfd5 Add -Wdeprecated to the build configuration 4bab55dc54b4 Removed a typo in README.md a67701056425 Googletest export fb5d9b66c5b0 Googletest export 1b3eb6ef3462 Googletest export b0e53e2d64db Merge pull request #2797 from Jyun-Neng:master d7ca9af0049e Googletest export 955552518b4e Googletest export ef25d27d4604 Merge pull request #2815 from Quuxplusone:simple 129329787429 Googletest export b99b421d8d68 Merge pull request #2818 from inazarenko:master 472cd8fd8b1c Merge pull request #2818 from inazarenko:master 3cfb4117f7e5 Googletest export 0eea2e9fc634 Googletest export a9f6c1ed1401 Googletest export 1a9c3e441407 Merge pull request #2830 from keshavgbpecdelhi:patch-1 e589a3371705 Merge pull request #2751 from calumr:quiet-flag Change-Id: Id788a27aa884ef68a21bae6c178cd456f5f6f2b0 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2186009 Reviewed-by: Joshua Peraza <jperaza@chromium.org> Commit-Queue: Mark Mentovai <mark@chromium.org>
2020-05-06 20:39:19 -04:00
"../third_party/googletest:googletest",
"../third_party/mini_chromium:base",
Rework GN files to start to support building standalone, and also in Chromium - Adds a .gn and a build/BUILDCONFIG.gn that uses mini_chromium's build/BUILD.gn. - Adds some stub BUILD.gn files in locations where Chromium expects them (in //build, //testing, //third_party) containing empty targets/configs. These are no-ops in standalone builds, but add functionality when building in Chromium. This is in preference to having a global bool that conditionally does Chromium-y things in the Crashpad build files. These stub files are all contained in a secondary source root in build/chromium_compatibility, referred to by //.gn. - Adds //base/BUILD.gn which forwards to mini_chromium/base. This is only used when building standalone so that both Chromium and Crashpad can refer to it as "//base". - Changes references to other Crashpad targets to be relatively specified so that they work when the root of the project is //, and also when it's //third_party/crashpad/crashpad as it is in Chromium. - Moves any error-causing Mac/Win-specific files into explicit if (is_mac) or if (is_win) blocks as part of removing the dependency on set_sources_assignment_filter(). As yet unresolved: - CRASHPAD_IN_CHROMIUM needs to be removed when standalone; to be tackled in a follow up. - Not sure what to do with zlib yet, the build file currently assumes "in Chromium" too, and similarly having Crashpad //third_party/zlib:zlib pointing at itself doesn't work. Bug: crashpad:79 Change-Id: I6a7dda214e4b3b14a60c1ed285267ab97432a1a8 Reviewed-on: https://chromium-review.googlesource.com/777410 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org>
2017-11-28 10:31:13 -08:00
"../util",
]
if (crashpad_is_win) {
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
deps += [
"../minidump:test_support",
"win/wer:crashpad_wer_test",
]
data_deps = [
":crashpad_handler_test_extended_handler",
":fake_handler_that_crashes_at_startup",
]
}
}
if (!crashpad_is_ios) {
crashpad_executable("crashpad_handler") {
sources = [ "main.cc" ]
deps = [
":handler",
"../build:default_exe_manifest_win",
"../compat",
"../third_party/mini_chromium:base",
"../tools:tool_support",
]
if (crashpad_is_win) {
if (crashpad_is_in_chromium || crashpad_is_in_dart) {
remove_configs = [ "//build/config/win:console" ]
configs = [ "//build/config/win:windowed" ]
} else if (crashpad_is_external) {
remove_configs =
[ "//../../mini_chromium/mini_chromium/build/config:win_console" ]
configs =
[ "//../../mini_chromium/mini_chromium/build/config:win_windowed" ]
} else {
remove_configs = [
"//third_party/mini_chromium/mini_chromium/build/config:win_console",
]
configs = [
"//third_party/mini_chromium/mini_chromium/build/config:win_windowed",
]
}
}
if (crashpad_is_linux) {
deps += [ "../client:pthread_create" ]
}
}
}
# There is not any normal way to package native executables in an Android APK.
# It is normal to package native code as a loadable module but Android's APK
# installer will ignore files not named like a shared object, so give the
# handler executable an acceptable name.
if (crashpad_is_android) {
copy("crashpad_handler_named_as_so") {
deps = [ ":crashpad_handler" ]
sources = [ "$root_out_dir/crashpad_handler" ]
outputs = [ "$root_out_dir/libcrashpad_handler.so" ]
}
crashpad_executable("crashpad_handler_trampoline") {
output_name = "libcrashpad_handler_trampoline.so"
sources = [ "linux/handler_trampoline.cc" ]
deps = [ "../util:no_cfi_icall" ]
libs = [ "log" ]
if (crashpad_is_in_chromium) {
# Chromium's sanitizer runtime libraries do not include an unwinder,
# so add Chromium's standard dependencies to link against the in-tree
# libunwind.
import("//build/config/sanitizers/sanitizers.gni")
no_default_deps = !using_sanitizer
remove_configs =
[ "//build/config/android:default_orderfile_instrumentation" ]
}
}
}
if (!crashpad_is_ios) {
crashpad_executable("crashpad_handler_test_extended_handler") {
testonly = true
sources = [ "crashpad_handler_test_extended_handler.cc" ]
deps = [
":handler",
"../build:default_exe_manifest_win",
"../compat",
"../minidump:test_support",
"../third_party/mini_chromium:base",
"../tools:tool_support",
]
}
}
if (crashpad_is_win) {
crashpad_executable("crashpad_handler_com") {
sources = [ "main.cc" ]
# Avoid .exp, .ilk, and .lib file collisions with crashpad_handler.exe by
# having this target produce crashpad_handler_com.com. Dont use this target
# directly. Instead, use crashpad_handler_console.
output_extension = "com"
deps = [
":handler",
"../build:default_exe_manifest_win",
Rework GN files to start to support building standalone, and also in Chromium - Adds a .gn and a build/BUILDCONFIG.gn that uses mini_chromium's build/BUILD.gn. - Adds some stub BUILD.gn files in locations where Chromium expects them (in //build, //testing, //third_party) containing empty targets/configs. These are no-ops in standalone builds, but add functionality when building in Chromium. This is in preference to having a global bool that conditionally does Chromium-y things in the Crashpad build files. These stub files are all contained in a secondary source root in build/chromium_compatibility, referred to by //.gn. - Adds //base/BUILD.gn which forwards to mini_chromium/base. This is only used when building standalone so that both Chromium and Crashpad can refer to it as "//base". - Changes references to other Crashpad targets to be relatively specified so that they work when the root of the project is //, and also when it's //third_party/crashpad/crashpad as it is in Chromium. - Moves any error-causing Mac/Win-specific files into explicit if (is_mac) or if (is_win) blocks as part of removing the dependency on set_sources_assignment_filter(). As yet unresolved: - CRASHPAD_IN_CHROMIUM needs to be removed when standalone; to be tackled in a follow up. - Not sure what to do with zlib yet, the build file currently assumes "in Chromium" too, and similarly having Crashpad //third_party/zlib:zlib pointing at itself doesn't work. Bug: crashpad:79 Change-Id: I6a7dda214e4b3b14a60c1ed285267ab97432a1a8 Reviewed-on: https://chromium-review.googlesource.com/777410 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org>
2017-11-28 10:31:13 -08:00
"../compat",
"../third_party/mini_chromium:base",
"../tools:tool_support",
]
}
copy("crashpad_handler_console") {
deps = [ ":crashpad_handler_com" ]
sources = [ "$root_out_dir/crashpad_handler_com.com" ]
outputs = [ "$root_out_dir/crashpad_handler.com" ]
}
crashpad_executable("crash_other_program") {
testonly = true
sources = [ "win/crash_other_program.cc" ]
deps = [
"../client",
"../test",
Update gtest to e3f0319d89f4cbf32993de595d984183b1a9fc57 I’m most interested in picking up 1b3eb6ef3462, “Explicitly define copy constructors used in googletest tests.” This also reorganizes files and rewrites text to refer to this project as Google Test and googletest (and Google Mock and googlemock), as it prefers to be known. Some filenames are left at gtest_* following the precedent set by gtest itself. For example, #include "gtest/gtest.h" is still used, so #include "test/gtest_death.h" is retained too. gtest_all_test OutputFileHelpersTest.GetCurrentExecutableName hard-codes the expected executable name as gtest_all_test among other options that do not include googletest_all_test, so test executables retain their names as well. fb19f57880f6 Add GTEST_BRIEF option 3549237957a1 Ensure that gtest/gmock pkgconfig requirements specify version 189299e957bb Merge branch 'master' into quiet-flag 5504ded3ab5c Fix a typo in .travis.yml 6ed4e7168f54 Replace the last instance of `throw()` with `noexcept`. NFC 879fd9b45299 Remove duplicate codes existed in get-nprocessors.sh 644f3a992c28 gtest-unittest-api_test - fix warning in clang build 0b6d567619fe Remove redundant .c_str() be3ac45cf673 fix signed/unsigned comparison issue (on OpenBSD) b51a49e0cb82 Merge pull request #2773 from Quuxplusone:replace-noexcept c2032090f373 Merge pull request #2772 from Quuxplusone:travis 4fe5ac53337e Merge pull request #2756 from Conan-Kudo:fix-pkgconfig-reqs 373d72b6986f Googletest export 4c8e6a9fe1c8 Merge pull request #2810 from ptahmose:master 71d5df6c6b67 Merge pull request #2802 from e-i-n-s:fix_clang_warning dcc92d0ab6c4 Merge pull request #2805 from pepsiman:patch-1 4f002f1e236c VariadicMatcher needs a non-defaulted move constructor for compile-time performance 9d580ea80592 Enable protobuf printing for open-source proto messages 766ac2e1a413 Remove all uses of GTEST_DISALLOW_{MOVE_,}ASSIGN_ 11b3cec177b1 Fix a -Wdeprecated warning 01c0ff5e2373 Fix a -Wdeprecated warning c7d8ec72cc4b Fix a -Wdeprecated warning 1b066f4edfd5 Add -Wdeprecated to the build configuration 4bab55dc54b4 Removed a typo in README.md a67701056425 Googletest export fb5d9b66c5b0 Googletest export 1b3eb6ef3462 Googletest export b0e53e2d64db Merge pull request #2797 from Jyun-Neng:master d7ca9af0049e Googletest export 955552518b4e Googletest export ef25d27d4604 Merge pull request #2815 from Quuxplusone:simple 129329787429 Googletest export b99b421d8d68 Merge pull request #2818 from inazarenko:master 472cd8fd8b1c Merge pull request #2818 from inazarenko:master 3cfb4117f7e5 Googletest export 0eea2e9fc634 Googletest export a9f6c1ed1401 Googletest export 1a9c3e441407 Merge pull request #2830 from keshavgbpecdelhi:patch-1 e589a3371705 Merge pull request #2751 from calumr:quiet-flag Change-Id: Id788a27aa884ef68a21bae6c178cd456f5f6f2b0 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2186009 Reviewed-by: Joshua Peraza <jperaza@chromium.org> Commit-Queue: Mark Mentovai <mark@chromium.org>
2020-05-06 20:39:19 -04:00
"../third_party/googletest:googletest",
"../third_party/mini_chromium:base",
]
}
crashpad_executable("crashy_program") {
testonly = true
sources = [ "win/crashy_test_program.cc" ]
deps = [
"../client",
"../third_party/mini_chromium:base",
]
}
crashpad_executable("crashy_signal") {
testonly = true
sources = [ "win/crashy_signal.cc" ]
cflags = [ "/wd4702" ] # Unreachable code.
deps = [
"../client",
"../third_party/mini_chromium:base",
]
}
crashpad_executable("fake_handler_that_crashes_at_startup") {
testonly = true
sources = [ "win/fake_handler_that_crashes_at_startup.cc" ]
}
crashpad_executable("hanging_program") {
testonly = true
sources = [ "win/hanging_program.cc" ]
deps = [
"../client",
"../third_party/mini_chromium:base",
]
}
crashpad_loadable_module("loader_lock_dll") {
testonly = true
sources = [ "win/loader_lock_dll.cc" ]
}
crashpad_executable("self_destroying_program") {
testonly = true
sources = [ "win/self_destroying_test_program.cc" ]
deps = [
"../client",
"../compat",
"../snapshot",
"../third_party/mini_chromium:base",
]
}
crashpad_executable("heap_corrupting_program") {
testonly = true
sources = [ "win/heap_corrupting_program.cc" ]
deps = [
"../client",
"../compat",
"../snapshot",
"../third_party/mini_chromium:base",
]
}
if (current_cpu == "x86") {
# Cannot create an x64 DLL with embedded debug info.
crashpad_executable("crashy_z7_loader") {
testonly = true
sources = [ "win/crashy_test_z7_loader.cc" ]
deps = [
"../client",
"../test",
"../third_party/mini_chromium:base",
]
}
}
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
config("enable_cfg") {
cflags = [ "/guard:cf" ]
ldflags = [ "/guard:cf" ]
}
crashpad_executable("fastfail_program") {
testonly = true
sources = [ "win/fastfail_test_program.cc" ]
configs = [ ":enable_cfg" ]
deps = [
"../client",
"../third_party/mini_chromium:base",
]
}
}