mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-29 00:32:35 +08:00
6719610b8c
ProcessSnapshotFuchsia is just a stub, so running fails immediately. Bug: crashpad:196 Change-Id: Ie281cc13c4ff4a6e9699e882dbd6207daaab346d Reviewed-on: https://chromium-review.googlesource.com/809234 Reviewed-by: Mark Mentovai <mark@chromium.org> Commit-Queue: Scott Graham <scottmg@chromium.org>
433 lines
11 KiB
Plaintext
433 lines
11 KiB
Plaintext
# Copyright 2015 The Crashpad Authors. All rights reserved.
|
|
#
|
|
# 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/config/compiler/compiler.gni")
|
|
import("//testing/test.gni")
|
|
|
|
static_library("snapshot") {
|
|
sources = [
|
|
"annotation_snapshot.cc",
|
|
"annotation_snapshot.h",
|
|
"capture_memory.cc",
|
|
"capture_memory.h",
|
|
"cpu_architecture.h",
|
|
"cpu_context.cc",
|
|
"cpu_context.h",
|
|
"crashpad_info_client_options.cc",
|
|
"crashpad_info_client_options.h",
|
|
"exception_snapshot.h",
|
|
"handle_snapshot.cc",
|
|
"handle_snapshot.h",
|
|
"memory_snapshot.h",
|
|
"minidump/minidump_annotation_reader.cc",
|
|
"minidump/minidump_annotation_reader.h",
|
|
"minidump/minidump_simple_string_dictionary_reader.cc",
|
|
"minidump/minidump_simple_string_dictionary_reader.h",
|
|
"minidump/minidump_string_list_reader.cc",
|
|
"minidump/minidump_string_list_reader.h",
|
|
"minidump/minidump_string_reader.cc",
|
|
"minidump/minidump_string_reader.h",
|
|
"minidump/module_snapshot_minidump.cc",
|
|
"minidump/module_snapshot_minidump.h",
|
|
"minidump/process_snapshot_minidump.cc",
|
|
"minidump/process_snapshot_minidump.h",
|
|
"module_snapshot.h",
|
|
"posix/timezone.cc",
|
|
"posix/timezone.h",
|
|
"process_snapshot.h",
|
|
"snapshot_constants.h",
|
|
"system_snapshot.h",
|
|
"thread_snapshot.h",
|
|
"unloaded_module_snapshot.cc",
|
|
"unloaded_module_snapshot.h",
|
|
]
|
|
|
|
if (is_mac) {
|
|
sources += [
|
|
"mac/cpu_context_mac.cc",
|
|
"mac/cpu_context_mac.h",
|
|
"mac/exception_snapshot_mac.cc",
|
|
"mac/exception_snapshot_mac.h",
|
|
"mac/mach_o_image_annotations_reader.cc",
|
|
"mac/mach_o_image_annotations_reader.h",
|
|
"mac/mach_o_image_reader.cc",
|
|
"mac/mach_o_image_reader.h",
|
|
"mac/mach_o_image_segment_reader.cc",
|
|
"mac/mach_o_image_segment_reader.h",
|
|
"mac/mach_o_image_symbol_table_reader.cc",
|
|
"mac/mach_o_image_symbol_table_reader.h",
|
|
"mac/memory_snapshot_mac.cc",
|
|
"mac/memory_snapshot_mac.h",
|
|
"mac/module_snapshot_mac.cc",
|
|
"mac/module_snapshot_mac.h",
|
|
"mac/process_reader.cc",
|
|
"mac/process_reader.h",
|
|
"mac/process_snapshot_mac.cc",
|
|
"mac/process_snapshot_mac.h",
|
|
"mac/process_types.cc",
|
|
"mac/process_types.h",
|
|
"mac/process_types/all.proctype",
|
|
"mac/process_types/annotation.proctype",
|
|
"mac/process_types/crashpad_info.proctype",
|
|
"mac/process_types/crashreporterclient.proctype",
|
|
"mac/process_types/custom.cc",
|
|
"mac/process_types/dyld_images.proctype",
|
|
"mac/process_types/flavors.h",
|
|
"mac/process_types/internal.h",
|
|
"mac/process_types/loader.proctype",
|
|
"mac/process_types/nlist.proctype",
|
|
"mac/process_types/traits.h",
|
|
"mac/system_snapshot_mac.cc",
|
|
"mac/system_snapshot_mac.h",
|
|
"mac/thread_snapshot_mac.cc",
|
|
"mac/thread_snapshot_mac.h",
|
|
]
|
|
}
|
|
|
|
if (is_win) {
|
|
sources += [
|
|
"win/capture_memory_delegate_win.cc",
|
|
"win/capture_memory_delegate_win.h",
|
|
"win/cpu_context_win.cc",
|
|
"win/cpu_context_win.h",
|
|
"win/exception_snapshot_win.cc",
|
|
"win/exception_snapshot_win.h",
|
|
"win/memory_map_region_snapshot_win.cc",
|
|
"win/memory_map_region_snapshot_win.h",
|
|
"win/memory_snapshot_win.cc",
|
|
"win/memory_snapshot_win.h",
|
|
"win/module_snapshot_win.cc",
|
|
"win/module_snapshot_win.h",
|
|
"win/pe_image_annotations_reader.cc",
|
|
"win/pe_image_annotations_reader.h",
|
|
"win/pe_image_reader.cc",
|
|
"win/pe_image_reader.h",
|
|
"win/pe_image_resource_reader.cc",
|
|
"win/pe_image_resource_reader.h",
|
|
"win/process_reader_win.cc",
|
|
"win/process_reader_win.h",
|
|
"win/process_snapshot_win.cc",
|
|
"win/process_snapshot_win.h",
|
|
"win/process_subrange_reader.cc",
|
|
"win/process_subrange_reader.h",
|
|
"win/system_snapshot_win.cc",
|
|
"win/system_snapshot_win.h",
|
|
"win/thread_snapshot_win.cc",
|
|
"win/thread_snapshot_win.h",
|
|
]
|
|
}
|
|
|
|
if (is_fuchsia) {
|
|
sources += [
|
|
"fuchsia/process_snapshot_fuchsia.cc",
|
|
"fuchsia/process_snapshot_fuchsia.h",
|
|
]
|
|
}
|
|
|
|
if (target_cpu == "x86" || target_cpu == "x64") {
|
|
sources += [
|
|
"x86/cpuid_reader.cc",
|
|
"x86/cpuid_reader.h",
|
|
]
|
|
}
|
|
|
|
public_configs = [ "..:crashpad_config" ]
|
|
|
|
deps = [
|
|
"../client",
|
|
"../compat",
|
|
"../util",
|
|
"//base",
|
|
]
|
|
|
|
if (is_win) {
|
|
cflags = [ "/wd4201" ] # nonstandard extension used : nameless struct/union
|
|
libs = [ "powrprof.lib" ]
|
|
}
|
|
}
|
|
|
|
if (is_win) {
|
|
static_library("snapshot_api") {
|
|
sources = [
|
|
"api/module_annotations_win.cc",
|
|
"api/module_annotations_win.h",
|
|
]
|
|
|
|
public_configs = [ "..:crashpad_config" ]
|
|
|
|
cflags = [ "/wd4201" ]
|
|
|
|
deps = [
|
|
":snapshot",
|
|
"../compat",
|
|
"../util",
|
|
"//base",
|
|
]
|
|
}
|
|
} else {
|
|
group("snapshot_api") {
|
|
}
|
|
}
|
|
|
|
static_library("test_support") {
|
|
testonly = true
|
|
|
|
sources = [
|
|
"test/test_cpu_context.cc",
|
|
"test/test_cpu_context.h",
|
|
"test/test_exception_snapshot.cc",
|
|
"test/test_exception_snapshot.h",
|
|
"test/test_memory_map_region_snapshot.cc",
|
|
"test/test_memory_map_region_snapshot.h",
|
|
"test/test_memory_snapshot.cc",
|
|
"test/test_memory_snapshot.h",
|
|
"test/test_module_snapshot.cc",
|
|
"test/test_module_snapshot.h",
|
|
"test/test_process_snapshot.cc",
|
|
"test/test_process_snapshot.h",
|
|
"test/test_system_snapshot.cc",
|
|
"test/test_system_snapshot.h",
|
|
"test/test_thread_snapshot.cc",
|
|
"test/test_thread_snapshot.h",
|
|
]
|
|
|
|
public_configs = [ "..:crashpad_config" ]
|
|
|
|
public_deps = [
|
|
":snapshot",
|
|
]
|
|
|
|
deps = [
|
|
"../compat",
|
|
"../util",
|
|
"//base",
|
|
]
|
|
|
|
if (is_win) {
|
|
cflags = [ "/wd4201" ] # nonstandard extension used : nameless struct/union
|
|
}
|
|
}
|
|
|
|
source_set("snapshot_test") {
|
|
testonly = true
|
|
|
|
sources = [
|
|
"cpu_context_test.cc",
|
|
"crashpad_info_client_options_test.cc",
|
|
"minidump/process_snapshot_minidump_test.cc",
|
|
]
|
|
|
|
if (is_mac) {
|
|
sources += [
|
|
"mac/cpu_context_mac_test.cc",
|
|
"mac/mach_o_image_annotations_reader_test.cc",
|
|
"mac/mach_o_image_reader_test.cc",
|
|
"mac/mach_o_image_segment_reader_test.cc",
|
|
"mac/process_reader_test.cc",
|
|
"mac/process_types_test.cc",
|
|
"mac/system_snapshot_mac_test.cc",
|
|
]
|
|
}
|
|
|
|
if (is_win) {
|
|
sources += [
|
|
"api/module_annotations_win_test.cc",
|
|
"win/cpu_context_win_test.cc",
|
|
"win/exception_snapshot_win_test.cc",
|
|
"win/extra_memory_ranges_test.cc",
|
|
"win/pe_image_annotations_reader_test.cc",
|
|
"win/pe_image_reader_test.cc",
|
|
"win/process_reader_win_test.cc",
|
|
"win/process_snapshot_win_test.cc",
|
|
"win/system_snapshot_win_test.cc",
|
|
]
|
|
} else {
|
|
sources += [ "posix/timezone_test.cc" ]
|
|
}
|
|
|
|
deps = [
|
|
":snapshot_api",
|
|
":test_support",
|
|
"../client",
|
|
"../compat",
|
|
"../test",
|
|
"../util",
|
|
"//base",
|
|
"//testing/gtest",
|
|
]
|
|
|
|
data_deps = [
|
|
":crashpad_snapshot_test_module",
|
|
":crashpad_snapshot_test_module_large",
|
|
":crashpad_snapshot_test_module_small",
|
|
]
|
|
|
|
if (is_mac) {
|
|
libs = [ "OpenCL.framework" ]
|
|
|
|
data_deps += [
|
|
":crashpad_snapshot_test_module_crashy_initializer",
|
|
":crashpad_snapshot_test_no_op",
|
|
]
|
|
}
|
|
|
|
if (is_win) {
|
|
cflags = [ "/wd4201" ] # nonstandard extension used : nameless struct/union
|
|
|
|
data_deps += [
|
|
":crashpad_snapshot_test_annotations",
|
|
":crashpad_snapshot_test_crashing_child",
|
|
":crashpad_snapshot_test_dump_without_crashing",
|
|
":crashpad_snapshot_test_extra_memory_ranges",
|
|
":crashpad_snapshot_test_image_reader",
|
|
":crashpad_snapshot_test_image_reader_module",
|
|
]
|
|
}
|
|
}
|
|
|
|
loadable_module("crashpad_snapshot_test_module") {
|
|
testonly = true
|
|
sources = [
|
|
"crashpad_info_client_options_test_module.cc",
|
|
]
|
|
deps = [
|
|
"../client",
|
|
"//base",
|
|
]
|
|
}
|
|
|
|
loadable_module("crashpad_snapshot_test_module_large") {
|
|
testonly = true
|
|
sources = [
|
|
"crashpad_info_size_test_module.cc",
|
|
]
|
|
defines = [ "CRASHPAD_INFO_SIZE_TEST_MODULE_LARGE" ]
|
|
deps = [
|
|
"//base",
|
|
]
|
|
}
|
|
|
|
loadable_module("crashpad_snapshot_test_module_small") {
|
|
testonly = true
|
|
sources = [
|
|
"crashpad_info_size_test_module.cc",
|
|
]
|
|
defines = [ "CRASHPAD_INFO_SIZE_TEST_MODULE_SMALL" ]
|
|
deps = [
|
|
"//base",
|
|
]
|
|
}
|
|
|
|
if (is_mac) {
|
|
loadable_module("crashpad_snapshot_test_module_crashy_initializer") {
|
|
testonly = true
|
|
sources = [
|
|
"mac/mach_o_image_annotations_reader_test_module_crashy_initializer.cc",
|
|
]
|
|
}
|
|
|
|
executable("crashpad_snapshot_test_no_op") {
|
|
testonly = true
|
|
sources = [
|
|
"mac/mach_o_image_annotations_reader_test_no_op.cc",
|
|
]
|
|
}
|
|
}
|
|
|
|
if (is_win) {
|
|
executable("crashpad_snapshot_test_annotations") {
|
|
testonly = true
|
|
sources = [
|
|
"win/crashpad_snapshot_test_annotations.cc",
|
|
]
|
|
deps = [
|
|
"../client",
|
|
"../compat",
|
|
"//base",
|
|
]
|
|
}
|
|
|
|
executable("crashpad_snapshot_test_crashing_child") {
|
|
testonly = true
|
|
sources = [
|
|
"win/crashpad_snapshot_test_crashing_child.cc",
|
|
]
|
|
deps = [
|
|
"../client",
|
|
"../compat",
|
|
"../util",
|
|
"//base",
|
|
]
|
|
}
|
|
|
|
executable("crashpad_snapshot_test_dump_without_crashing") {
|
|
testonly = true
|
|
sources = [
|
|
"win/crashpad_snapshot_test_dump_without_crashing.cc",
|
|
]
|
|
deps = [
|
|
"../client",
|
|
"../compat",
|
|
"../util",
|
|
"//base",
|
|
]
|
|
}
|
|
|
|
executable("crashpad_snapshot_test_extra_memory_ranges") {
|
|
testonly = true
|
|
sources = [
|
|
"win/crashpad_snapshot_test_extra_memory_ranges.cc",
|
|
]
|
|
deps = [
|
|
"../client",
|
|
"../compat",
|
|
"//base",
|
|
]
|
|
}
|
|
|
|
executable("crashpad_snapshot_test_image_reader") {
|
|
testonly = true
|
|
sources = [
|
|
"win/crashpad_snapshot_test_image_reader.cc",
|
|
]
|
|
deps = [
|
|
"../client",
|
|
"../compat",
|
|
"../util",
|
|
"//base",
|
|
]
|
|
if (symbol_level == 0) {
|
|
# The tests that use this executable rely on at least minimal debug info.
|
|
configs -= [ "//build/config/compiler:default_symbols" ]
|
|
configs += [ "//build/config/compiler:minimal_symbols" ]
|
|
}
|
|
}
|
|
|
|
loadable_module("crashpad_snapshot_test_image_reader_module") {
|
|
testonly = true
|
|
sources = [
|
|
"win/crashpad_snapshot_test_image_reader_module.cc",
|
|
]
|
|
deps = [
|
|
"../client",
|
|
"//base",
|
|
]
|
|
if (symbol_level == 0) {
|
|
# The tests that use this module rely on at least minimal debug info.
|
|
configs -= [ "//build/config/compiler:default_symbols" ]
|
|
configs += [ "//build/config/compiler:minimal_symbols" ]
|
|
}
|
|
}
|
|
}
|