2021-02-17 04:02:14 +01:00
|
|
|
package {
|
2021-06-25 23:42:51 +02:00
|
|
|
default_applicable_licenses: ["Android-Apache-2.0"],
|
2021-02-17 04:02:14 +01:00
|
|
|
}
|
|
|
|
|
2016-10-19 03:17:52 +02:00
|
|
|
cc_defaults {
|
|
|
|
name: "debuggerd_defaults",
|
|
|
|
cflags: [
|
|
|
|
"-Wall",
|
|
|
|
"-Wextra",
|
2017-03-13 22:13:29 +01:00
|
|
|
"-Werror",
|
2021-06-17 21:49:50 +02:00
|
|
|
"-Wno-gcc-compat",
|
2017-08-21 23:31:17 +02:00
|
|
|
"-Wno-unused-argument",
|
|
|
|
"-Wno-unused-function",
|
2016-10-19 03:17:52 +02:00
|
|
|
"-Wno-nullability-completeness",
|
2023-09-12 22:01:10 +02:00
|
|
|
"-Wno-reorder-init-list",
|
2016-10-19 03:17:52 +02:00
|
|
|
"-Os",
|
2021-08-11 22:21:11 +02:00
|
|
|
"-fno-finite-loops",
|
2022-09-01 12:33:35 +02:00
|
|
|
"-DANDROID_DEBUGGABLE=0",
|
2016-10-19 03:17:52 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
local_include_dirs: ["include"],
|
2022-09-01 12:33:35 +02:00
|
|
|
product_variables: {
|
|
|
|
debuggable: {
|
2024-02-26 22:29:20 +01:00
|
|
|
cflags: [
|
|
|
|
"-UANDROID_DEBUGGABLE",
|
|
|
|
"-DANDROID_DEBUGGABLE=1",
|
|
|
|
],
|
|
|
|
},
|
2022-09-01 12:33:35 +02:00
|
|
|
},
|
2016-10-19 03:17:52 +02:00
|
|
|
}
|
|
|
|
|
2017-05-24 16:07:25 +02:00
|
|
|
cc_library_headers {
|
|
|
|
name: "libdebuggerd_common_headers",
|
2018-02-17 02:58:14 +01:00
|
|
|
export_include_dirs: ["common/include"],
|
2018-05-24 07:11:00 +02:00
|
|
|
recovery_available: true,
|
2020-10-28 00:25:45 +01:00
|
|
|
vendor_ramdisk_available: true,
|
2022-03-25 20:43:14 +01:00
|
|
|
apex_available: [
|
2024-01-02 23:39:00 +01:00
|
|
|
"com.android.runtime",
|
2022-03-25 20:43:14 +01:00
|
|
|
"com.android.virt",
|
|
|
|
"//apex_available:platform",
|
2024-01-02 23:39:00 +01:00
|
|
|
],
|
2017-05-24 16:07:25 +02:00
|
|
|
}
|
|
|
|
|
2017-05-10 11:58:59 +02:00
|
|
|
cc_library_shared {
|
|
|
|
name: "libtombstoned_client",
|
|
|
|
defaults: ["debuggerd_defaults"],
|
|
|
|
srcs: [
|
|
|
|
"tombstoned/tombstoned_client.cpp",
|
|
|
|
"util.cpp",
|
|
|
|
],
|
|
|
|
|
2017-05-24 16:07:25 +02:00
|
|
|
header_libs: ["libdebuggerd_common_headers"],
|
|
|
|
|
2017-05-10 11:58:59 +02:00
|
|
|
static_libs: [
|
2017-05-24 16:07:25 +02:00
|
|
|
"libasync_safe",
|
2017-05-10 11:58:59 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
shared_libs: [
|
|
|
|
"libbase",
|
2017-05-24 16:07:25 +02:00
|
|
|
"libcutils",
|
2017-05-10 11:58:59 +02:00
|
|
|
],
|
2022-03-25 20:43:14 +01:00
|
|
|
apex_available: [
|
|
|
|
"com.android.virt",
|
|
|
|
"//apex_available:platform",
|
|
|
|
],
|
2017-05-10 11:58:59 +02:00
|
|
|
|
2017-05-24 16:07:25 +02:00
|
|
|
export_header_lib_headers: ["libdebuggerd_common_headers"],
|
2018-02-17 02:58:14 +01:00
|
|
|
export_include_dirs: ["tombstoned/include"],
|
2017-05-10 11:58:59 +02:00
|
|
|
}
|
|
|
|
|
2018-08-07 00:38:29 +02:00
|
|
|
// Utility library to talk to tombstoned and get an output fd.
|
2017-03-02 02:23:22 +01:00
|
|
|
cc_library_static {
|
2017-05-10 11:58:59 +02:00
|
|
|
name: "libtombstoned_client_static",
|
2017-03-02 02:23:22 +01:00
|
|
|
defaults: ["debuggerd_defaults"],
|
2018-05-29 09:41:30 +02:00
|
|
|
recovery_available: true,
|
2020-10-28 00:25:45 +01:00
|
|
|
vendor_ramdisk_available: true,
|
2017-03-02 02:23:22 +01:00
|
|
|
srcs: [
|
2017-05-10 11:58:59 +02:00
|
|
|
"tombstoned/tombstoned_client.cpp",
|
2017-03-02 02:23:22 +01:00
|
|
|
"util.cpp",
|
|
|
|
],
|
|
|
|
|
2017-05-24 16:07:25 +02:00
|
|
|
header_libs: ["libdebuggerd_common_headers"],
|
|
|
|
|
2017-03-02 02:23:22 +01:00
|
|
|
whole_static_libs: [
|
2017-04-25 20:23:10 +02:00
|
|
|
"libasync_safe",
|
2017-03-02 02:23:22 +01:00
|
|
|
"libcutils",
|
|
|
|
"libbase",
|
|
|
|
],
|
2017-05-10 11:58:59 +02:00
|
|
|
|
2017-05-24 16:07:25 +02:00
|
|
|
export_header_lib_headers: ["libdebuggerd_common_headers"],
|
2018-02-17 02:58:14 +01:00
|
|
|
export_include_dirs: ["tombstoned/include"],
|
2024-01-04 02:34:40 +01:00
|
|
|
apex_available: ["com.android.runtime"],
|
2017-03-02 02:23:22 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// Core implementation, linked into libdebuggerd_handler and the dynamic linker.
|
2016-06-16 02:29:00 +02:00
|
|
|
cc_library_static {
|
2017-02-09 01:06:26 +01:00
|
|
|
name: "libdebuggerd_handler_core",
|
2016-10-19 03:17:52 +02:00
|
|
|
defaults: ["debuggerd_defaults"],
|
2018-05-24 07:11:00 +02:00
|
|
|
recovery_available: true,
|
2020-10-28 00:25:45 +01:00
|
|
|
vendor_ramdisk_available: true,
|
2016-10-19 03:17:52 +02:00
|
|
|
srcs: ["handler/debuggerd_handler.cpp"],
|
|
|
|
|
2017-08-26 03:00:18 +02:00
|
|
|
header_libs: [
|
|
|
|
"libbase_headers",
|
|
|
|
"libdebuggerd_common_headers",
|
2019-12-13 23:11:04 +01:00
|
|
|
"bionic_libc_platform_headers",
|
2023-01-19 23:23:49 +01:00
|
|
|
"gwp_asan_headers",
|
2017-08-26 03:00:18 +02:00
|
|
|
],
|
2017-05-24 16:07:25 +02:00
|
|
|
|
2017-02-09 01:06:26 +01:00
|
|
|
whole_static_libs: [
|
2017-04-25 20:23:10 +02:00
|
|
|
"libasync_safe",
|
2017-08-21 23:31:17 +02:00
|
|
|
"libcutils",
|
2017-02-09 01:06:26 +01:00
|
|
|
"libdebuggerd",
|
|
|
|
],
|
|
|
|
|
2017-05-24 16:07:25 +02:00
|
|
|
export_header_lib_headers: ["libdebuggerd_common_headers"],
|
2017-02-09 01:06:26 +01:00
|
|
|
export_include_dirs: ["include"],
|
2024-01-02 23:39:00 +01:00
|
|
|
apex_available: [
|
|
|
|
"com.android.runtime",
|
|
|
|
],
|
2017-02-09 01:06:26 +01:00
|
|
|
}
|
|
|
|
|
2017-03-02 02:23:22 +01:00
|
|
|
// Implementation with a no-op fallback.
|
2017-02-09 01:06:26 +01:00
|
|
|
cc_library_static {
|
|
|
|
name: "libdebuggerd_handler",
|
|
|
|
defaults: ["debuggerd_defaults"],
|
|
|
|
srcs: ["handler/debuggerd_fallback_nop.cpp"],
|
|
|
|
|
2019-12-13 23:11:04 +01:00
|
|
|
header_libs: ["bionic_libc_platform_headers"],
|
|
|
|
export_header_lib_headers: ["bionic_libc_platform_headers"],
|
|
|
|
|
2017-02-09 01:06:26 +01:00
|
|
|
whole_static_libs: [
|
|
|
|
"libdebuggerd_handler_core",
|
|
|
|
],
|
|
|
|
|
|
|
|
export_include_dirs: ["include"],
|
|
|
|
}
|
|
|
|
|
2019-10-23 22:32:43 +02:00
|
|
|
// Fallback implementation, for use in the Bionic linker only.
|
2017-02-09 01:06:26 +01:00
|
|
|
cc_library_static {
|
|
|
|
name: "libdebuggerd_handler_fallback",
|
2019-10-23 22:32:43 +02:00
|
|
|
visibility: ["//bionic/linker"],
|
|
|
|
apex_available: [
|
|
|
|
"com.android.runtime",
|
|
|
|
"//apex_available:platform",
|
|
|
|
],
|
2017-02-09 01:06:26 +01:00
|
|
|
defaults: ["debuggerd_defaults"],
|
2018-05-29 09:41:30 +02:00
|
|
|
recovery_available: true,
|
2020-10-28 00:25:45 +01:00
|
|
|
vendor_ramdisk_available: true,
|
2017-03-02 02:23:22 +01:00
|
|
|
srcs: [
|
|
|
|
"handler/debuggerd_fallback.cpp",
|
|
|
|
],
|
2017-02-09 01:06:26 +01:00
|
|
|
|
2017-03-02 02:23:22 +01:00
|
|
|
whole_static_libs: [
|
|
|
|
"libdebuggerd_handler_core",
|
2017-05-10 11:58:59 +02:00
|
|
|
"libtombstoned_client_static",
|
2017-04-25 20:23:10 +02:00
|
|
|
"libasync_safe",
|
2017-03-02 02:23:22 +01:00
|
|
|
"libbase",
|
2017-02-09 01:06:26 +01:00
|
|
|
"libdebuggerd",
|
2019-10-23 22:32:43 +02:00
|
|
|
"libunwindstack_no_dex",
|
2017-02-09 01:06:26 +01:00
|
|
|
"liblzma",
|
|
|
|
"libcutils",
|
|
|
|
],
|
2019-12-13 23:11:04 +01:00
|
|
|
|
|
|
|
header_libs: ["bionic_libc_platform_headers"],
|
|
|
|
export_header_lib_headers: ["bionic_libc_platform_headers"],
|
|
|
|
|
2016-10-19 03:17:52 +02:00
|
|
|
export_include_dirs: ["include"],
|
|
|
|
}
|
|
|
|
|
|
|
|
cc_library {
|
|
|
|
name: "libdebuggerd_client",
|
|
|
|
defaults: ["debuggerd_defaults"],
|
|
|
|
srcs: [
|
|
|
|
"client/debuggerd_client.cpp",
|
|
|
|
"util.cpp",
|
|
|
|
],
|
|
|
|
|
|
|
|
shared_libs: [
|
|
|
|
"libbase",
|
|
|
|
"libcutils",
|
2019-01-04 22:57:09 +01:00
|
|
|
"libprocinfo",
|
2016-10-19 03:17:52 +02:00
|
|
|
],
|
2017-03-02 02:23:22 +01:00
|
|
|
|
2019-12-13 23:11:04 +01:00
|
|
|
header_libs: [
|
|
|
|
"libdebuggerd_common_headers",
|
|
|
|
"bionic_libc_platform_headers",
|
|
|
|
],
|
|
|
|
export_header_lib_headers: [
|
|
|
|
"libdebuggerd_common_headers",
|
|
|
|
"bionic_libc_platform_headers",
|
|
|
|
],
|
|
|
|
|
2016-10-19 03:17:52 +02:00
|
|
|
export_include_dirs: ["include"],
|
|
|
|
}
|
|
|
|
|
2023-11-17 18:06:15 +01:00
|
|
|
cc_library {
|
|
|
|
name: "libdebuggerd_tombstone_proto_to_text",
|
|
|
|
defaults: ["debuggerd_defaults"],
|
|
|
|
ramdisk_available: true,
|
|
|
|
recovery_available: true,
|
|
|
|
vendor_ramdisk_available: true,
|
|
|
|
|
|
|
|
local_include_dirs: ["libdebuggerd/include"],
|
|
|
|
export_include_dirs: ["libdebuggerd/include"],
|
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"libdebuggerd/tombstone_proto_to_text.cpp",
|
|
|
|
],
|
|
|
|
|
|
|
|
header_libs: [
|
|
|
|
"bionic_libc_platform_headers",
|
|
|
|
],
|
|
|
|
|
|
|
|
static_libs: [
|
|
|
|
"libbase",
|
|
|
|
"liblog_for_runtime_apex",
|
|
|
|
"libunwindstack",
|
|
|
|
],
|
|
|
|
|
|
|
|
whole_static_libs: [
|
|
|
|
"libtombstone_proto",
|
|
|
|
"libprotobuf-cpp-lite",
|
|
|
|
],
|
|
|
|
|
|
|
|
apex_available: [
|
|
|
|
"//apex_available:platform",
|
|
|
|
"com.android.runtime",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2017-02-09 01:06:26 +01:00
|
|
|
cc_library_static {
|
2016-10-19 03:17:52 +02:00
|
|
|
name: "libdebuggerd",
|
|
|
|
defaults: ["debuggerd_defaults"],
|
2023-07-31 23:24:01 +02:00
|
|
|
ramdisk_available: true,
|
2018-05-24 07:11:00 +02:00
|
|
|
recovery_available: true,
|
2020-10-28 00:25:45 +01:00
|
|
|
vendor_ramdisk_available: true,
|
2016-10-19 03:17:52 +02:00
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"libdebuggerd/backtrace.cpp",
|
2020-02-14 23:54:31 +01:00
|
|
|
"libdebuggerd/gwp_asan.cpp",
|
2016-10-19 03:17:52 +02:00
|
|
|
"libdebuggerd/open_files_list.cpp",
|
|
|
|
"libdebuggerd/tombstone.cpp",
|
2021-01-27 00:53:11 +01:00
|
|
|
"libdebuggerd/tombstone_proto.cpp",
|
2016-10-19 03:17:52 +02:00
|
|
|
"libdebuggerd/utility.cpp",
|
|
|
|
],
|
|
|
|
|
|
|
|
local_include_dirs: ["libdebuggerd/include"],
|
|
|
|
export_include_dirs: ["libdebuggerd/include"],
|
|
|
|
|
2020-04-07 23:07:32 +02:00
|
|
|
include_dirs: [
|
|
|
|
// Needed for private/bionic_fdsan.h
|
|
|
|
"bionic/libc",
|
|
|
|
],
|
2020-02-14 23:54:31 +01:00
|
|
|
header_libs: [
|
|
|
|
"bionic_libc_platform_headers",
|
|
|
|
"gwp_asan_headers",
|
2022-08-19 06:21:02 +02:00
|
|
|
"liblog_headers",
|
2020-02-14 23:54:31 +01:00
|
|
|
],
|
2018-08-07 03:26:42 +02:00
|
|
|
|
2017-02-09 01:06:26 +01:00
|
|
|
static_libs: [
|
2024-02-26 22:29:20 +01:00
|
|
|
"libdexfile_support", // libunwindstack dependency
|
2017-08-12 00:29:19 +02:00
|
|
|
"libunwindstack",
|
2017-02-09 01:06:26 +01:00
|
|
|
"liblzma",
|
2016-10-19 03:17:52 +02:00
|
|
|
"libbase",
|
|
|
|
"libcutils",
|
|
|
|
],
|
2019-12-13 23:11:04 +01:00
|
|
|
|
2020-04-07 23:07:32 +02:00
|
|
|
whole_static_libs: [
|
2023-11-17 18:06:15 +01:00
|
|
|
"libdebuggerd_tombstone_proto_to_text",
|
2021-01-27 02:45:43 +01:00
|
|
|
"libasync_safe",
|
2020-04-07 23:07:32 +02:00
|
|
|
"gwp_asan_crash_handler",
|
2021-01-27 00:53:11 +01:00
|
|
|
"libtombstone_proto",
|
2021-03-02 08:13:13 +01:00
|
|
|
"libprocinfo",
|
2021-01-27 00:53:11 +01:00
|
|
|
"libprotobuf-cpp-lite",
|
2020-04-07 23:07:32 +02:00
|
|
|
],
|
2020-02-14 23:54:31 +01:00
|
|
|
|
2018-12-19 15:28:33 +01:00
|
|
|
target: {
|
|
|
|
recovery: {
|
|
|
|
exclude_static_libs: [
|
2019-10-23 22:32:43 +02:00
|
|
|
"libdexfile_support",
|
2018-12-19 15:28:33 +01:00
|
|
|
],
|
2021-08-26 22:18:43 +02:00
|
|
|
exclude_runtime_libs: [
|
|
|
|
"libdexfile",
|
|
|
|
],
|
2018-12-19 15:28:33 +01:00
|
|
|
},
|
2020-10-28 00:25:45 +01:00
|
|
|
vendor_ramdisk: {
|
|
|
|
exclude_static_libs: [
|
|
|
|
"libdexfile_support",
|
|
|
|
],
|
2021-08-26 22:18:43 +02:00
|
|
|
exclude_runtime_libs: [
|
|
|
|
"libdexfile",
|
|
|
|
],
|
2020-10-28 00:25:45 +01:00
|
|
|
},
|
2023-07-31 23:24:01 +02:00
|
|
|
ramdisk: {
|
|
|
|
exclude_static_libs: [
|
|
|
|
"libdexfile_support",
|
|
|
|
],
|
|
|
|
exclude_runtime_libs: [
|
|
|
|
"libdexfile",
|
|
|
|
],
|
|
|
|
},
|
|
|
|
android: {
|
|
|
|
runtime_libs: [
|
2024-02-26 22:29:20 +01:00
|
|
|
"libdexfile", // libdexfile_support dependency
|
2023-07-31 23:24:01 +02:00
|
|
|
],
|
|
|
|
},
|
2018-12-19 15:28:33 +01:00
|
|
|
},
|
2019-04-03 18:27:12 +02:00
|
|
|
|
|
|
|
product_variables: {
|
|
|
|
debuggable: {
|
|
|
|
cflags: ["-DROOT_POSSIBLE"],
|
|
|
|
},
|
2021-09-24 09:06:38 +02:00
|
|
|
|
|
|
|
malloc_not_svelte: {
|
|
|
|
cflags: ["-DUSE_SCUDO"],
|
|
|
|
whole_static_libs: ["libscudo"],
|
|
|
|
srcs: ["libdebuggerd/scudo.cpp"],
|
|
|
|
header_libs: ["scudo_headers"],
|
|
|
|
},
|
2019-04-03 18:27:12 +02:00
|
|
|
},
|
2024-01-02 23:39:00 +01:00
|
|
|
apex_available: [
|
|
|
|
"com.android.runtime",
|
|
|
|
],
|
2016-10-19 03:17:52 +02:00
|
|
|
}
|
|
|
|
|
2021-01-27 00:53:11 +01:00
|
|
|
cc_binary {
|
|
|
|
name: "pbtombstone",
|
|
|
|
defaults: ["debuggerd_defaults"],
|
|
|
|
srcs: ["pbtombstone.cpp"],
|
|
|
|
static_libs: [
|
|
|
|
"libbase",
|
|
|
|
"libdebuggerd",
|
|
|
|
"liblog",
|
|
|
|
"libprotobuf-cpp-lite",
|
|
|
|
"libtombstone_proto",
|
|
|
|
"libunwindstack",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2021-04-16 18:40:40 +02:00
|
|
|
cc_test_library {
|
|
|
|
name: "libcrash_test",
|
|
|
|
defaults: ["debuggerd_defaults"],
|
|
|
|
srcs: ["crash_test.cpp"],
|
|
|
|
}
|
|
|
|
|
2016-10-19 03:17:52 +02:00
|
|
|
cc_test {
|
|
|
|
name: "debuggerd_test",
|
|
|
|
defaults: ["debuggerd_defaults"],
|
2019-08-28 01:02:38 +02:00
|
|
|
require_root: true,
|
2016-10-19 03:17:52 +02:00
|
|
|
|
|
|
|
cflags: ["-Wno-missing-field-initializers"],
|
|
|
|
srcs: [
|
|
|
|
"libdebuggerd/test/dump_memory_test.cpp",
|
|
|
|
"libdebuggerd/test/elf_fake.cpp",
|
|
|
|
"libdebuggerd/test/log_fake.cpp",
|
|
|
|
"libdebuggerd/test/open_files_list_test.cpp",
|
2023-11-17 18:06:15 +01:00
|
|
|
"libdebuggerd/test/tombstone_proto_to_text_test.cpp",
|
2016-10-19 03:17:52 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
target: {
|
|
|
|
android: {
|
|
|
|
srcs: [
|
2017-03-25 00:26:03 +01:00
|
|
|
"client/debuggerd_client_test.cpp",
|
2016-10-19 03:17:52 +02:00
|
|
|
"debuggerd_test.cpp",
|
|
|
|
],
|
2018-02-17 02:58:14 +01:00
|
|
|
static_libs: [
|
|
|
|
"libasync_safe",
|
|
|
|
"libtombstoned_client_static",
|
|
|
|
],
|
2016-10-19 03:17:52 +02:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
shared_libs: [
|
|
|
|
"libbase",
|
|
|
|
"libcutils",
|
2017-03-25 00:26:03 +01:00
|
|
|
"libdebuggerd_client",
|
2017-05-24 16:07:25 +02:00
|
|
|
"liblog",
|
2018-02-17 02:58:14 +01:00
|
|
|
"libnativehelper",
|
2019-02-20 18:01:24 +01:00
|
|
|
"libunwindstack",
|
2016-10-19 03:17:52 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
static_libs: [
|
2017-03-31 01:46:21 +02:00
|
|
|
"libdebuggerd",
|
2020-02-14 23:54:31 +01:00
|
|
|
"libgmock",
|
2020-07-21 08:11:16 +02:00
|
|
|
"libminijail",
|
2016-10-19 03:17:52 +02:00
|
|
|
],
|
|
|
|
|
2019-12-13 23:11:04 +01:00
|
|
|
header_libs: [
|
|
|
|
"bionic_libc_platform_headers",
|
2020-02-14 23:54:31 +01:00
|
|
|
"gwp_asan_headers",
|
2019-12-13 23:11:04 +01:00
|
|
|
],
|
|
|
|
|
2016-10-19 03:17:52 +02:00
|
|
|
local_include_dirs: [
|
|
|
|
"libdebuggerd",
|
|
|
|
],
|
|
|
|
|
|
|
|
compile_multilib: "both",
|
|
|
|
multilib: {
|
|
|
|
lib32: {
|
|
|
|
stem: "debuggerd_test32",
|
|
|
|
},
|
|
|
|
lib64: {
|
|
|
|
stem: "debuggerd_test64",
|
|
|
|
},
|
|
|
|
},
|
2018-04-28 01:12:06 +02:00
|
|
|
|
2021-04-16 18:40:40 +02:00
|
|
|
data: [
|
|
|
|
":libcrash_test",
|
|
|
|
],
|
|
|
|
|
2018-04-28 01:12:06 +02:00
|
|
|
test_suites: ["device-tests"],
|
2016-10-19 03:17:52 +02:00
|
|
|
}
|
|
|
|
|
2017-12-20 00:08:19 +01:00
|
|
|
cc_benchmark {
|
|
|
|
name: "debuggerd_benchmark",
|
|
|
|
defaults: ["debuggerd_defaults"],
|
|
|
|
srcs: ["debuggerd_benchmark.cpp"],
|
|
|
|
shared_libs: [
|
|
|
|
"libbase",
|
|
|
|
"libdebuggerd_client",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2016-10-19 03:17:52 +02:00
|
|
|
cc_binary {
|
|
|
|
name: "crash_dump",
|
|
|
|
srcs: [
|
|
|
|
"crash_dump.cpp",
|
2023-02-03 16:05:18 +01:00
|
|
|
"tombstone_handler.cpp",
|
2016-10-19 03:17:52 +02:00
|
|
|
"util.cpp",
|
|
|
|
],
|
|
|
|
defaults: ["debuggerd_defaults"],
|
|
|
|
|
|
|
|
compile_multilib: "both",
|
|
|
|
multilib: {
|
|
|
|
lib32: {
|
|
|
|
suffix: "32",
|
|
|
|
},
|
|
|
|
lib64: {
|
|
|
|
suffix: "64",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2019-12-13 23:11:04 +01:00
|
|
|
header_libs: [
|
|
|
|
"bionic_libc_platform_headers",
|
|
|
|
],
|
|
|
|
|
2017-02-09 01:06:26 +01:00
|
|
|
static_libs: [
|
2017-05-10 11:58:59 +02:00
|
|
|
"libtombstoned_client_static",
|
2017-02-09 01:06:26 +01:00
|
|
|
"libdebuggerd",
|
|
|
|
"libcutils",
|
2021-01-27 00:53:11 +01:00
|
|
|
|
|
|
|
"libtombstone_proto",
|
|
|
|
"libprotobuf-cpp-lite",
|
2017-02-09 01:06:26 +01:00
|
|
|
],
|
|
|
|
|
2016-10-19 03:17:52 +02:00
|
|
|
shared_libs: [
|
|
|
|
"libbase",
|
|
|
|
"liblog",
|
|
|
|
"libprocinfo",
|
2017-08-21 23:31:17 +02:00
|
|
|
"libunwindstack",
|
2016-10-19 03:17:52 +02:00
|
|
|
],
|
2020-03-17 02:14:13 +01:00
|
|
|
|
|
|
|
apex_available: [
|
|
|
|
"com.android.runtime",
|
|
|
|
],
|
2022-02-03 02:00:42 +01:00
|
|
|
|
|
|
|
// Required for tests.
|
|
|
|
required: ["crash_dump.policy"],
|
2016-10-19 03:17:52 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
cc_binary {
|
|
|
|
name: "debuggerd",
|
|
|
|
srcs: [
|
|
|
|
"debuggerd.cpp",
|
|
|
|
],
|
|
|
|
defaults: ["debuggerd_defaults"],
|
|
|
|
|
|
|
|
shared_libs: [
|
|
|
|
"libbase",
|
|
|
|
"libdebuggerd_client",
|
|
|
|
"liblog",
|
2017-06-27 23:08:05 +02:00
|
|
|
"libprocinfo",
|
2016-10-19 03:17:52 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
local_include_dirs: ["include"],
|
|
|
|
}
|
|
|
|
|
2022-10-24 16:31:11 +02:00
|
|
|
cc_defaults {
|
|
|
|
name: "tombstoned_defaults",
|
2016-10-19 03:17:52 +02:00
|
|
|
srcs: [
|
|
|
|
"util.cpp",
|
|
|
|
"tombstoned/intercept_manager.cpp",
|
|
|
|
"tombstoned/tombstoned.cpp",
|
|
|
|
],
|
|
|
|
defaults: ["debuggerd_defaults"],
|
|
|
|
|
2019-12-13 23:11:04 +01:00
|
|
|
header_libs: [
|
|
|
|
"bionic_libc_platform_headers",
|
2024-02-26 22:29:20 +01:00
|
|
|
"libdebuggerd_common_headers",
|
2019-12-13 23:11:04 +01:00
|
|
|
],
|
2017-05-24 16:07:25 +02:00
|
|
|
|
2016-10-19 03:17:52 +02:00
|
|
|
static_libs: [
|
|
|
|
"libbase",
|
|
|
|
"libcutils",
|
|
|
|
"libevent",
|
|
|
|
"liblog",
|
|
|
|
],
|
2022-10-24 16:31:11 +02:00
|
|
|
}
|
2016-06-16 02:29:00 +02:00
|
|
|
|
2022-10-24 16:31:11 +02:00
|
|
|
cc_binary {
|
|
|
|
name: "tombstoned",
|
|
|
|
defaults: ["tombstoned_defaults"],
|
2018-02-17 02:58:14 +01:00
|
|
|
init_rc: ["tombstoned/tombstoned.rc"],
|
2016-06-16 02:29:00 +02:00
|
|
|
}
|
2020-01-22 00:21:08 +01:00
|
|
|
|
2022-10-24 16:31:11 +02:00
|
|
|
cc_binary {
|
|
|
|
name: "tombstoned.microdroid",
|
|
|
|
defaults: ["tombstoned_defaults"],
|
|
|
|
init_rc: ["tombstoned/tombstoned.microdroid.rc"],
|
|
|
|
}
|
|
|
|
|
2020-01-22 00:21:08 +01:00
|
|
|
prebuilt_etc {
|
|
|
|
name: "crash_dump.policy",
|
|
|
|
sub_dir: "seccomp_policy",
|
|
|
|
filename_from_src: true,
|
|
|
|
arch: {
|
|
|
|
arm: {
|
|
|
|
src: "seccomp_policy/crash_dump.arm.policy",
|
2022-11-14 21:02:28 +01:00
|
|
|
required: [
|
|
|
|
"crash_dump.policy_other",
|
|
|
|
],
|
2020-01-22 00:21:08 +01:00
|
|
|
},
|
|
|
|
arm64: {
|
|
|
|
src: "seccomp_policy/crash_dump.arm64.policy",
|
2022-11-14 21:02:28 +01:00
|
|
|
required: [
|
|
|
|
"crash_dump.policy_other",
|
|
|
|
],
|
2020-01-22 00:21:08 +01:00
|
|
|
},
|
2022-10-12 16:32:55 +02:00
|
|
|
riscv64: {
|
|
|
|
src: "seccomp_policy/crash_dump.riscv64.policy",
|
|
|
|
},
|
2020-01-22 00:21:08 +01:00
|
|
|
x86: {
|
|
|
|
src: "seccomp_policy/crash_dump.x86.policy",
|
2022-11-14 21:02:28 +01:00
|
|
|
required: [
|
|
|
|
"crash_dump.policy_other",
|
|
|
|
],
|
2020-01-22 00:21:08 +01:00
|
|
|
},
|
|
|
|
x86_64: {
|
|
|
|
src: "seccomp_policy/crash_dump.x86_64.policy",
|
2022-11-14 21:02:28 +01:00
|
|
|
required: [
|
|
|
|
"crash_dump.policy_other",
|
|
|
|
],
|
2020-01-22 00:21:08 +01:00
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2022-11-14 21:02:28 +01:00
|
|
|
// This installs the "other" architecture (so 32-bit on 64-bit device).
|
2020-01-22 00:21:08 +01:00
|
|
|
prebuilt_etc {
|
|
|
|
name: "crash_dump.policy_other",
|
|
|
|
sub_dir: "seccomp_policy",
|
|
|
|
filename_from_src: true,
|
|
|
|
arch: {
|
|
|
|
arm: {
|
|
|
|
src: "seccomp_policy/crash_dump.arm64.policy",
|
|
|
|
},
|
|
|
|
arm64: {
|
|
|
|
src: "seccomp_policy/crash_dump.arm.policy",
|
|
|
|
},
|
2023-03-20 23:48:30 +01:00
|
|
|
riscv64: {
|
|
|
|
enabled: false,
|
|
|
|
},
|
2020-01-22 00:21:08 +01:00
|
|
|
x86: {
|
|
|
|
src: "seccomp_policy/crash_dump.x86_64.policy",
|
|
|
|
},
|
|
|
|
x86_64: {
|
|
|
|
src: "seccomp_policy/crash_dump.x86.policy",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|