2016-10-19 09:17:52 +08:00
|
|
|
cc_defaults {
|
|
|
|
name: "debuggerd_defaults",
|
|
|
|
cflags: [
|
|
|
|
"-Wall",
|
|
|
|
"-Wextra",
|
2017-03-14 05:13:29 +08:00
|
|
|
"-Werror",
|
2016-10-19 09:17:52 +08:00
|
|
|
"-Wno-nullability-completeness",
|
|
|
|
"-Os",
|
|
|
|
],
|
|
|
|
|
|
|
|
local_include_dirs: ["include"],
|
|
|
|
}
|
|
|
|
|
2017-05-10 17:58:59 +08:00
|
|
|
cc_library_shared {
|
|
|
|
name: "libtombstoned_client",
|
|
|
|
defaults: ["debuggerd_defaults"],
|
|
|
|
srcs: [
|
|
|
|
"tombstoned/tombstoned_client.cpp",
|
|
|
|
"util.cpp",
|
|
|
|
],
|
|
|
|
|
|
|
|
static_libs: [
|
|
|
|
"libasync_safe"
|
|
|
|
],
|
|
|
|
|
|
|
|
shared_libs: [
|
|
|
|
"libcutils",
|
|
|
|
"libbase",
|
|
|
|
],
|
|
|
|
|
|
|
|
export_include_dirs: ["tombstoned/include"]
|
|
|
|
}
|
|
|
|
|
2017-03-02 09:23:22 +08:00
|
|
|
// Utility library to tombstoned and get an output fd.
|
|
|
|
cc_library_static {
|
2017-05-10 17:58:59 +08:00
|
|
|
name: "libtombstoned_client_static",
|
2017-03-02 09:23:22 +08:00
|
|
|
defaults: ["debuggerd_defaults"],
|
|
|
|
srcs: [
|
2017-05-10 17:58:59 +08:00
|
|
|
"tombstoned/tombstoned_client.cpp",
|
2017-03-02 09:23:22 +08:00
|
|
|
"util.cpp",
|
|
|
|
],
|
|
|
|
|
|
|
|
whole_static_libs: [
|
2017-04-26 02:23:10 +08:00
|
|
|
"libasync_safe",
|
2017-03-02 09:23:22 +08:00
|
|
|
"libcutils",
|
|
|
|
"libbase",
|
|
|
|
],
|
2017-05-10 17:58:59 +08:00
|
|
|
|
|
|
|
export_include_dirs: ["tombstoned/include"]
|
2017-03-02 09:23:22 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// Core implementation, linked into libdebuggerd_handler and the dynamic linker.
|
2016-06-16 08:29:00 +08:00
|
|
|
cc_library_static {
|
2017-02-09 08:06:26 +08:00
|
|
|
name: "libdebuggerd_handler_core",
|
2016-10-19 09:17:52 +08:00
|
|
|
defaults: ["debuggerd_defaults"],
|
|
|
|
srcs: ["handler/debuggerd_handler.cpp"],
|
|
|
|
|
2017-02-09 08:06:26 +08:00
|
|
|
whole_static_libs: [
|
2017-04-26 02:23:10 +08:00
|
|
|
"libasync_safe",
|
2017-02-09 08:06:26 +08:00
|
|
|
"libdebuggerd",
|
|
|
|
],
|
|
|
|
|
|
|
|
export_include_dirs: ["include"],
|
|
|
|
}
|
|
|
|
|
2017-03-02 09:23:22 +08:00
|
|
|
// Implementation with a no-op fallback.
|
2017-02-09 08:06:26 +08: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 09:23:22 +08:00
|
|
|
// Fallback implementation.
|
2017-02-09 08:06:26 +08:00
|
|
|
cc_library_static {
|
|
|
|
name: "libdebuggerd_handler_fallback",
|
|
|
|
defaults: ["debuggerd_defaults"],
|
2017-03-02 09:23:22 +08:00
|
|
|
srcs: [
|
|
|
|
"handler/debuggerd_fallback.cpp",
|
|
|
|
],
|
2017-02-09 08:06:26 +08:00
|
|
|
|
2017-03-02 09:23:22 +08:00
|
|
|
whole_static_libs: [
|
|
|
|
"libdebuggerd_handler_core",
|
2017-05-10 17:58:59 +08:00
|
|
|
"libtombstoned_client_static",
|
2017-04-26 02:23:10 +08:00
|
|
|
"libasync_safe",
|
2017-03-02 09:23:22 +08:00
|
|
|
"libbase",
|
2017-02-09 08:06:26 +08:00
|
|
|
"libdebuggerd",
|
|
|
|
"libbacktrace",
|
|
|
|
"libunwind",
|
|
|
|
"liblzma",
|
|
|
|
"libcutils",
|
|
|
|
],
|
2016-10-19 09:17:52 +08:00
|
|
|
|
|
|
|
export_include_dirs: ["include"],
|
|
|
|
}
|
|
|
|
|
|
|
|
cc_library {
|
|
|
|
name: "libdebuggerd_client",
|
|
|
|
defaults: ["debuggerd_defaults"],
|
|
|
|
srcs: [
|
|
|
|
"client/debuggerd_client.cpp",
|
|
|
|
"util.cpp",
|
|
|
|
],
|
|
|
|
|
|
|
|
shared_libs: [
|
|
|
|
"libbase",
|
|
|
|
"libcutils",
|
|
|
|
],
|
2017-03-02 09:23:22 +08:00
|
|
|
|
2016-10-19 09:17:52 +08:00
|
|
|
export_include_dirs: ["include"],
|
|
|
|
}
|
|
|
|
|
2017-02-09 08:06:26 +08:00
|
|
|
cc_library_static {
|
2016-10-19 09:17:52 +08:00
|
|
|
name: "libdebuggerd",
|
|
|
|
defaults: ["debuggerd_defaults"],
|
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"libdebuggerd/backtrace.cpp",
|
|
|
|
"libdebuggerd/elf_utils.cpp",
|
|
|
|
"libdebuggerd/open_files_list.cpp",
|
|
|
|
"libdebuggerd/tombstone.cpp",
|
|
|
|
"libdebuggerd/utility.cpp",
|
|
|
|
],
|
|
|
|
|
|
|
|
target: {
|
|
|
|
android_arm: {
|
|
|
|
srcs: ["libdebuggerd/arm/machine.cpp"],
|
|
|
|
},
|
|
|
|
android_arm64: {
|
|
|
|
srcs: ["libdebuggerd/arm64/machine.cpp"],
|
|
|
|
},
|
|
|
|
android_mips: {
|
|
|
|
srcs: ["libdebuggerd/mips/machine.cpp"],
|
|
|
|
},
|
|
|
|
android_mips64: {
|
|
|
|
srcs: ["libdebuggerd/mips64/machine.cpp"],
|
|
|
|
},
|
|
|
|
android_x86: {
|
|
|
|
srcs: ["libdebuggerd/x86/machine.cpp"],
|
|
|
|
},
|
|
|
|
android_x86_64: {
|
|
|
|
srcs: ["libdebuggerd/x86_64/machine.cpp"],
|
|
|
|
},
|
2016-08-10 02:04:05 +08:00
|
|
|
},
|
|
|
|
|
2016-10-19 09:17:52 +08:00
|
|
|
local_include_dirs: ["libdebuggerd/include"],
|
|
|
|
export_include_dirs: ["libdebuggerd/include"],
|
|
|
|
|
2017-02-09 08:06:26 +08:00
|
|
|
static_libs: [
|
2016-10-19 09:17:52 +08:00
|
|
|
"libbacktrace",
|
2017-02-09 08:06:26 +08:00
|
|
|
"libunwind",
|
|
|
|
"liblzma",
|
2016-10-19 09:17:52 +08: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/property_fake.cpp",
|
|
|
|
"libdebuggerd/test/ptrace_fake.cpp",
|
|
|
|
"libdebuggerd/test/tombstone_test.cpp",
|
|
|
|
],
|
|
|
|
|
|
|
|
target: {
|
|
|
|
android: {
|
|
|
|
srcs: [
|
2017-03-25 07:26:03 +08:00
|
|
|
"client/debuggerd_client_test.cpp",
|
2016-10-19 09:17:52 +08:00
|
|
|
"debuggerd_test.cpp",
|
|
|
|
],
|
2017-05-10 17:58:59 +08:00
|
|
|
static_libs: ["libasync_safe", "libtombstoned_client_static"],
|
2016-10-19 09:17:52 +08:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
shared_libs: [
|
|
|
|
"libbacktrace",
|
|
|
|
"libbase",
|
|
|
|
"libcutils",
|
2017-03-25 07:26:03 +08:00
|
|
|
"libdebuggerd_client",
|
2017-05-10 17:58:59 +08:00
|
|
|
"liblog"
|
2016-10-19 09:17:52 +08:00
|
|
|
],
|
|
|
|
|
|
|
|
static_libs: [
|
2017-03-31 07:46:21 +08:00
|
|
|
"libdebuggerd",
|
2016-10-19 09:17:52 +08:00
|
|
|
],
|
|
|
|
|
|
|
|
local_include_dirs: [
|
|
|
|
"libdebuggerd",
|
|
|
|
],
|
|
|
|
|
|
|
|
compile_multilib: "both",
|
|
|
|
multilib: {
|
|
|
|
lib32: {
|
|
|
|
stem: "debuggerd_test32",
|
|
|
|
},
|
|
|
|
lib64: {
|
|
|
|
stem: "debuggerd_test64",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
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 08:06:26 +08:00
|
|
|
static_libs: [
|
2017-05-10 17:58:59 +08:00
|
|
|
"libtombstoned_client_static",
|
2017-02-09 08:06:26 +08:00
|
|
|
"libdebuggerd",
|
|
|
|
"libcutils",
|
|
|
|
],
|
|
|
|
|
2016-10-19 09:17:52 +08:00
|
|
|
shared_libs: [
|
|
|
|
"libbacktrace",
|
|
|
|
"libbase",
|
|
|
|
"liblog",
|
|
|
|
"libprocinfo",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
cc_binary {
|
|
|
|
name: "debuggerd",
|
|
|
|
srcs: [
|
|
|
|
"debuggerd.cpp",
|
|
|
|
],
|
|
|
|
defaults: ["debuggerd_defaults"],
|
|
|
|
|
|
|
|
shared_libs: [
|
|
|
|
"libbase",
|
|
|
|
"libdebuggerd_client",
|
|
|
|
"liblog",
|
|
|
|
"libselinux",
|
|
|
|
],
|
|
|
|
|
|
|
|
local_include_dirs: ["include"],
|
|
|
|
}
|
|
|
|
|
|
|
|
cc_binary {
|
|
|
|
name: "tombstoned",
|
|
|
|
srcs: [
|
|
|
|
"util.cpp",
|
|
|
|
"tombstoned/intercept_manager.cpp",
|
|
|
|
"tombstoned/tombstoned.cpp",
|
|
|
|
],
|
|
|
|
defaults: ["debuggerd_defaults"],
|
|
|
|
|
|
|
|
static_libs: [
|
|
|
|
"libbase",
|
|
|
|
"libcutils",
|
|
|
|
"libevent",
|
|
|
|
"liblog",
|
|
|
|
],
|
2016-06-16 08:29:00 +08:00
|
|
|
|
2016-10-19 09:17:52 +08:00
|
|
|
init_rc: ["tombstoned/tombstoned.rc"]
|
2016-06-16 08:29:00 +08:00
|
|
|
}
|
2017-02-02 08:59:15 +08:00
|
|
|
|
|
|
|
subdirs = [
|
|
|
|
"crasher",
|
|
|
|
]
|