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",
|
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",
|
|
|
|
"-Os",
|
|
|
|
],
|
2017-08-21 23:31:17 +02:00
|
|
|
cpp_std: "gnu++17",
|
2016-10-19 03:17:52 +02:00
|
|
|
|
|
|
|
local_include_dirs: ["include"],
|
|
|
|
}
|
|
|
|
|
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,
|
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
|
|
|
],
|
|
|
|
|
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,
|
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"],
|
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,
|
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",
|
|
|
|
],
|
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"],
|
|
|
|
}
|
|
|
|
|
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"],
|
|
|
|
|
|
|
|
whole_static_libs: [
|
|
|
|
"libdebuggerd_handler_core",
|
|
|
|
],
|
|
|
|
|
|
|
|
export_include_dirs: ["include"],
|
|
|
|
}
|
|
|
|
|
2017-03-02 02:23:22 +01:00
|
|
|
// Fallback implementation.
|
2017-02-09 01:06:26 +01:00
|
|
|
cc_library_static {
|
|
|
|
name: "libdebuggerd_handler_fallback",
|
|
|
|
defaults: ["debuggerd_defaults"],
|
2018-05-29 09:41:30 +02:00
|
|
|
recovery_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",
|
|
|
|
"libbacktrace",
|
2017-08-12 00:29:19 +02:00
|
|
|
"libunwindstack",
|
2018-01-19 19:26:36 +01:00
|
|
|
"libdexfile",
|
2017-02-09 01:06:26 +01:00
|
|
|
"liblzma",
|
|
|
|
"libcutils",
|
|
|
|
],
|
2018-05-29 09:41:30 +02:00
|
|
|
target: {
|
|
|
|
recovery: {
|
|
|
|
cflags: ["-DNO_LIBDEXFILE_SUPPORT"],
|
|
|
|
exclude_static_libs: ["libdexfile"],
|
|
|
|
},
|
|
|
|
},
|
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",
|
|
|
|
],
|
|
|
|
|
2017-05-24 16:07:25 +02:00
|
|
|
header_libs: ["libdebuggerd_common_headers"],
|
|
|
|
|
2016-10-19 03:17:52 +02:00
|
|
|
shared_libs: [
|
|
|
|
"libbase",
|
|
|
|
"libcutils",
|
|
|
|
],
|
2017-03-02 02:23:22 +01:00
|
|
|
|
2017-05-24 16:07:25 +02:00
|
|
|
export_header_lib_headers: ["libdebuggerd_common_headers"],
|
2016-10-19 03:17:52 +02:00
|
|
|
export_include_dirs: ["include"],
|
|
|
|
}
|
|
|
|
|
2017-02-09 01:06:26 +01:00
|
|
|
cc_library_static {
|
2016-10-19 03:17:52 +02:00
|
|
|
name: "libdebuggerd",
|
|
|
|
defaults: ["debuggerd_defaults"],
|
2018-05-24 07:11:00 +02:00
|
|
|
recovery_available: true,
|
2016-10-19 03:17:52 +02:00
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"libdebuggerd/backtrace.cpp",
|
|
|
|
"libdebuggerd/elf_utils.cpp",
|
|
|
|
"libdebuggerd/open_files_list.cpp",
|
|
|
|
"libdebuggerd/tombstone.cpp",
|
|
|
|
"libdebuggerd/utility.cpp",
|
|
|
|
],
|
|
|
|
|
|
|
|
local_include_dirs: ["libdebuggerd/include"],
|
|
|
|
export_include_dirs: ["libdebuggerd/include"],
|
|
|
|
|
2017-02-09 01:06:26 +01:00
|
|
|
static_libs: [
|
2016-10-19 03:17:52 +02:00
|
|
|
"libbacktrace",
|
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",
|
|
|
|
"liblog",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
cc_test {
|
|
|
|
name: "debuggerd_test",
|
|
|
|
defaults: ["debuggerd_defaults"],
|
|
|
|
|
|
|
|
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",
|
|
|
|
"libdebuggerd/test/tombstone_test.cpp",
|
|
|
|
],
|
|
|
|
|
|
|
|
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: [
|
|
|
|
"libbacktrace",
|
|
|
|
"libbase",
|
|
|
|
"libcutils",
|
2017-03-25 00:26:03 +01:00
|
|
|
"libdebuggerd_client",
|
2017-05-24 16:07:25 +02:00
|
|
|
"liblog",
|
2018-01-17 00:38:17 +01:00
|
|
|
"libminijail",
|
2018-02-17 02:58:14 +01:00
|
|
|
"libnativehelper",
|
2016-10-19 03:17:52 +02:00
|
|
|
],
|
|
|
|
|
|
|
|
static_libs: [
|
2017-03-31 01:46:21 +02:00
|
|
|
"libdebuggerd",
|
2017-08-21 23:31:17 +02:00
|
|
|
"libunwindstack",
|
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
|
|
|
|
|
|
|
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",
|
|
|
|
"util.cpp",
|
|
|
|
],
|
|
|
|
defaults: ["debuggerd_defaults"],
|
|
|
|
|
|
|
|
compile_multilib: "both",
|
|
|
|
multilib: {
|
|
|
|
lib32: {
|
|
|
|
suffix: "32",
|
|
|
|
},
|
|
|
|
lib64: {
|
|
|
|
suffix: "64",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
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",
|
|
|
|
],
|
|
|
|
|
2016-10-19 03:17:52 +02:00
|
|
|
shared_libs: [
|
|
|
|
"libbacktrace",
|
|
|
|
"libbase",
|
|
|
|
"liblog",
|
|
|
|
"libprocinfo",
|
2017-08-21 23:31:17 +02:00
|
|
|
"libunwindstack",
|
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"],
|
|
|
|
}
|
|
|
|
|
|
|
|
cc_binary {
|
|
|
|
name: "tombstoned",
|
|
|
|
srcs: [
|
|
|
|
"util.cpp",
|
|
|
|
"tombstoned/intercept_manager.cpp",
|
|
|
|
"tombstoned/tombstoned.cpp",
|
|
|
|
],
|
|
|
|
defaults: ["debuggerd_defaults"],
|
|
|
|
|
2017-05-24 16:07:25 +02:00
|
|
|
header_libs: ["libdebuggerd_common_headers"],
|
|
|
|
|
2016-10-19 03:17:52 +02:00
|
|
|
static_libs: [
|
|
|
|
"libbase",
|
|
|
|
"libcutils",
|
|
|
|
"libevent",
|
|
|
|
"liblog",
|
|
|
|
],
|
2016-06-16 02:29:00 +02:00
|
|
|
|
2018-02-17 02:58:14 +01:00
|
|
|
init_rc: ["tombstoned/tombstoned.rc"],
|
2016-06-16 02:29:00 +02:00
|
|
|
}
|
2017-02-02 01:59:15 +01:00
|
|
|
|
|
|
|
subdirs = [
|
|
|
|
"crasher",
|
|
|
|
]
|