2017-01-20 04:08:48 +00:00
|
|
|
//
|
|
|
|
// Copyright (C) 2017 The Android Open Source Project
|
|
|
|
//
|
|
|
|
// 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.
|
|
|
|
//
|
|
|
|
|
|
|
|
cc_defaults {
|
|
|
|
name: "libunwindstack_flags",
|
|
|
|
|
|
|
|
host_supported: true,
|
|
|
|
|
|
|
|
cflags: [
|
|
|
|
"-Wall",
|
|
|
|
"-Werror",
|
|
|
|
"-Wextra",
|
|
|
|
],
|
2017-01-30 21:45:16 +00:00
|
|
|
|
|
|
|
target: {
|
|
|
|
darwin: {
|
|
|
|
enabled: false,
|
|
|
|
},
|
2017-09-20 00:53:12 +00:00
|
|
|
linux_bionic: {
|
|
|
|
enabled: true,
|
|
|
|
},
|
2017-01-30 21:45:16 +00:00
|
|
|
},
|
2017-01-20 04:08:48 +00:00
|
|
|
}
|
|
|
|
|
2019-10-23 20:32:43 +00:00
|
|
|
cc_defaults {
|
|
|
|
name: "libunwindstack_defaults",
|
2017-01-20 04:08:48 +00:00
|
|
|
defaults: ["libunwindstack_flags"],
|
2017-07-14 17:37:19 +00:00
|
|
|
export_include_dirs: ["include"],
|
2017-01-20 04:08:48 +00:00
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"ArmExidx.cpp",
|
2019-04-05 18:23:32 +00:00
|
|
|
"DexFiles.cpp",
|
2017-04-24 18:14:39 +00:00
|
|
|
"DwarfCfa.cpp",
|
2017-11-03 21:50:27 +00:00
|
|
|
"DwarfEhFrameWithHdr.cpp",
|
2017-03-21 19:41:17 +00:00
|
|
|
"DwarfMemory.cpp",
|
2017-04-04 17:41:31 +00:00
|
|
|
"DwarfOp.cpp",
|
2017-05-11 01:34:15 +00:00
|
|
|
"DwarfSection.cpp",
|
2017-02-01 23:44:40 +00:00
|
|
|
"Elf.cpp",
|
|
|
|
"ElfInterface.cpp",
|
|
|
|
"ElfInterfaceArm.cpp",
|
2018-10-17 17:57:53 +00:00
|
|
|
"Global.cpp",
|
2017-12-21 02:49:01 +00:00
|
|
|
"JitDebug.cpp",
|
2017-01-20 04:08:48 +00:00
|
|
|
"Log.cpp",
|
2017-04-19 22:42:19 +00:00
|
|
|
"MapInfo.cpp",
|
2017-04-05 20:25:04 +00:00
|
|
|
"Maps.cpp",
|
2017-02-01 23:44:40 +00:00
|
|
|
"Memory.cpp",
|
2020-04-07 21:04:46 +00:00
|
|
|
"MemoryMte.cpp",
|
2018-04-05 18:15:00 +00:00
|
|
|
"LocalUnwinder.cpp",
|
2017-06-28 21:51:54 +00:00
|
|
|
"Regs.cpp",
|
2017-12-01 02:56:01 +00:00
|
|
|
"RegsArm.cpp",
|
|
|
|
"RegsArm64.cpp",
|
|
|
|
"RegsX86.cpp",
|
|
|
|
"RegsX86_64.cpp",
|
2017-11-08 09:53:53 +00:00
|
|
|
"RegsMips.cpp",
|
|
|
|
"RegsMips64.cpp",
|
2017-09-20 20:37:24 +00:00
|
|
|
"Unwinder.cpp",
|
2017-04-04 21:06:58 +00:00
|
|
|
"Symbols.cpp",
|
2017-01-20 04:08:48 +00:00
|
|
|
],
|
|
|
|
|
2017-10-23 21:25:08 +00:00
|
|
|
cflags: [
|
|
|
|
"-Wexit-time-destructors",
|
|
|
|
],
|
|
|
|
|
2017-09-01 18:17:16 +00:00
|
|
|
target: {
|
2017-10-02 17:29:02 +00:00
|
|
|
host: {
|
2020-04-23 15:49:12 +00:00
|
|
|
// Always disable optimizations for host to make it easier to debug.
|
2018-02-17 01:58:14 +00:00
|
|
|
cflags: [
|
|
|
|
"-O0",
|
|
|
|
"-g",
|
|
|
|
],
|
2017-09-01 18:17:16 +00:00
|
|
|
},
|
2020-04-23 15:49:12 +00:00
|
|
|
android: {
|
|
|
|
header_libs: ["bionic_libc_platform_headers"],
|
|
|
|
product_variables: {
|
|
|
|
experimental_mte: {
|
|
|
|
cflags: ["-DANDROID_EXPERIMENTAL_MTE"],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
linux_bionic: {
|
|
|
|
header_libs: ["bionic_libc_platform_headers"],
|
|
|
|
product_variables: {
|
|
|
|
experimental_mte: {
|
|
|
|
cflags: ["-DANDROID_EXPERIMENTAL_MTE"],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2017-09-01 18:17:16 +00:00
|
|
|
},
|
|
|
|
|
2017-07-07 23:35:48 +00:00
|
|
|
arch: {
|
|
|
|
x86: {
|
|
|
|
srcs: ["AsmGetRegsX86.S"],
|
|
|
|
},
|
|
|
|
x86_64: {
|
|
|
|
srcs: ["AsmGetRegsX86_64.S"],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
2018-05-11 00:19:12 +00:00
|
|
|
static_libs: [
|
|
|
|
"libprocinfo",
|
|
|
|
],
|
|
|
|
|
2017-01-20 04:08:48 +00:00
|
|
|
shared_libs: [
|
|
|
|
"libbase",
|
|
|
|
"liblog",
|
2017-06-28 21:51:54 +00:00
|
|
|
"liblzma",
|
2017-01-20 04:08:48 +00:00
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2019-10-23 20:32:43 +00:00
|
|
|
cc_library {
|
|
|
|
name: "libunwindstack",
|
|
|
|
vendor_available: true,
|
|
|
|
recovery_available: true,
|
2020-06-18 20:01:13 +00:00
|
|
|
// TODO(b/153609531): remove when no longer needed.
|
|
|
|
native_bridge_supported: true,
|
2019-10-23 20:32:43 +00:00
|
|
|
vndk: {
|
|
|
|
enabled: true,
|
|
|
|
support_system_process: true,
|
|
|
|
},
|
|
|
|
defaults: ["libunwindstack_defaults"],
|
|
|
|
|
|
|
|
srcs: ["DexFile.cpp"],
|
|
|
|
cflags: ["-DDEXFILE_SUPPORT"],
|
|
|
|
shared_libs: ["libdexfile_support"],
|
|
|
|
|
|
|
|
target: {
|
|
|
|
vendor: {
|
|
|
|
cflags: ["-UDEXFILE_SUPPORT"],
|
|
|
|
exclude_srcs: ["DexFile.cpp"],
|
|
|
|
exclude_shared_libs: ["libdexfile_support"],
|
|
|
|
},
|
|
|
|
recovery: {
|
|
|
|
cflags: ["-UDEXFILE_SUPPORT"],
|
|
|
|
exclude_srcs: ["DexFile.cpp"],
|
|
|
|
exclude_shared_libs: ["libdexfile_support"],
|
|
|
|
},
|
2020-06-18 20:01:13 +00:00
|
|
|
native_bridge: {
|
|
|
|
cflags: ["-UDEXFILE_SUPPORT"],
|
|
|
|
exclude_srcs: ["DexFile.cpp"],
|
|
|
|
exclude_shared_libs: ["libdexfile_support"],
|
|
|
|
},
|
2019-10-23 20:32:43 +00:00
|
|
|
},
|
2020-04-28 09:22:23 +00:00
|
|
|
|
|
|
|
apex_available: [
|
|
|
|
"//apex_available:platform",
|
|
|
|
"com.android.art.debug",
|
|
|
|
"com.android.art.release",
|
|
|
|
],
|
2019-10-23 20:32:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Static library without DEX support to avoid dependencies on the ART APEX.
|
|
|
|
cc_library_static {
|
|
|
|
name: "libunwindstack_no_dex",
|
|
|
|
recovery_available: true,
|
|
|
|
defaults: ["libunwindstack_defaults"],
|
|
|
|
|
|
|
|
visibility: [
|
|
|
|
"//system/core/debuggerd",
|
|
|
|
"//system/core/init",
|
|
|
|
"//system/core/libbacktrace",
|
|
|
|
],
|
|
|
|
apex_available: [
|
|
|
|
"//apex_available:platform",
|
|
|
|
"com.android.runtime",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2017-01-20 04:08:48 +00:00
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// Unit Tests
|
|
|
|
//-------------------------------------------------------------------------
|
2018-04-05 18:15:00 +00:00
|
|
|
cc_test_library {
|
|
|
|
name: "libunwindstack_local",
|
|
|
|
defaults: ["libunwindstack_flags"],
|
|
|
|
srcs: ["tests/TestLocal.cpp"],
|
|
|
|
|
|
|
|
cflags: [
|
|
|
|
"-O0",
|
|
|
|
"-g",
|
|
|
|
],
|
|
|
|
|
|
|
|
shared_libs: [
|
|
|
|
"libunwindstack",
|
|
|
|
],
|
2019-09-03 17:18:42 +00:00
|
|
|
relative_install_path: "libunwindstack_test",
|
2018-04-05 18:15:00 +00:00
|
|
|
}
|
|
|
|
|
2019-09-03 17:18:42 +00:00
|
|
|
cc_defaults {
|
|
|
|
name: "libunwindstack_testlib_flags",
|
2017-01-20 04:08:48 +00:00
|
|
|
defaults: ["libunwindstack_flags"],
|
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"tests/ArmExidxDecodeTest.cpp",
|
|
|
|
"tests/ArmExidxExtractTest.cpp",
|
2018-03-12 19:54:22 +00:00
|
|
|
"tests/DexFileTest.cpp",
|
|
|
|
"tests/DexFilesTest.cpp",
|
2017-04-24 18:14:39 +00:00
|
|
|
"tests/DwarfCfaLogTest.cpp",
|
|
|
|
"tests/DwarfCfaTest.cpp",
|
2017-06-13 02:14:20 +00:00
|
|
|
"tests/DwarfDebugFrameTest.cpp",
|
|
|
|
"tests/DwarfEhFrameTest.cpp",
|
2017-11-03 21:50:27 +00:00
|
|
|
"tests/DwarfEhFrameWithHdrTest.cpp",
|
2017-03-21 19:41:17 +00:00
|
|
|
"tests/DwarfMemoryTest.cpp",
|
2017-04-04 17:41:31 +00:00
|
|
|
"tests/DwarfOpLogTest.cpp",
|
|
|
|
"tests/DwarfOpTest.cpp",
|
2017-05-11 01:34:15 +00:00
|
|
|
"tests/DwarfSectionTest.cpp",
|
|
|
|
"tests/DwarfSectionImplTest.cpp",
|
2018-01-25 20:15:56 +00:00
|
|
|
"tests/ElfCacheTest.cpp",
|
2017-09-26 02:23:07 +00:00
|
|
|
"tests/ElfFake.cpp",
|
2017-02-01 23:44:40 +00:00
|
|
|
"tests/ElfInterfaceArmTest.cpp",
|
|
|
|
"tests/ElfInterfaceTest.cpp",
|
|
|
|
"tests/ElfTest.cpp",
|
2017-07-01 00:18:16 +00:00
|
|
|
"tests/ElfTestUtils.cpp",
|
2019-07-17 22:47:32 +00:00
|
|
|
"tests/IsolatedSettings.cpp",
|
2017-12-21 02:49:01 +00:00
|
|
|
"tests/JitDebugTest.cpp",
|
2019-09-16 21:36:55 +00:00
|
|
|
"tests/LocalUpdatableMapsTest.cpp",
|
2017-01-20 04:08:48 +00:00
|
|
|
"tests/LogFake.cpp",
|
2018-10-02 04:01:09 +00:00
|
|
|
"tests/MapInfoCreateMemoryTest.cpp",
|
2019-01-17 01:23:39 +00:00
|
|
|
"tests/MapInfoGetBuildIDTest.cpp",
|
2017-07-01 00:18:16 +00:00
|
|
|
"tests/MapInfoGetElfTest.cpp",
|
2017-12-02 05:37:37 +00:00
|
|
|
"tests/MapInfoGetLoadBiasTest.cpp",
|
2018-12-05 23:57:02 +00:00
|
|
|
"tests/MapInfoTest.cpp",
|
2017-04-05 20:25:04 +00:00
|
|
|
"tests/MapsTest.cpp",
|
2017-07-11 22:29:32 +00:00
|
|
|
"tests/MemoryBufferTest.cpp",
|
2018-11-14 23:36:45 +00:00
|
|
|
"tests/MemoryCacheTest.cpp",
|
2017-01-20 04:08:48 +00:00
|
|
|
"tests/MemoryFake.cpp",
|
|
|
|
"tests/MemoryFileTest.cpp",
|
|
|
|
"tests/MemoryLocalTest.cpp",
|
2018-04-03 23:03:28 +00:00
|
|
|
"tests/MemoryOfflineBufferTest.cpp",
|
2017-11-14 00:16:27 +00:00
|
|
|
"tests/MemoryOfflineTest.cpp",
|
2017-01-20 04:08:48 +00:00
|
|
|
"tests/MemoryRangeTest.cpp",
|
2018-10-02 04:01:09 +00:00
|
|
|
"tests/MemoryRangesTest.cpp",
|
2017-01-20 04:08:48 +00:00
|
|
|
"tests/MemoryRemoteTest.cpp",
|
2017-07-07 19:18:16 +00:00
|
|
|
"tests/MemoryTest.cpp",
|
2020-04-07 21:04:46 +00:00
|
|
|
"tests/MemoryMteTest.cpp",
|
2018-08-02 22:21:37 +00:00
|
|
|
"tests/RegsInfoTest.cpp",
|
2017-09-22 19:57:15 +00:00
|
|
|
"tests/RegsIterateTest.cpp",
|
2017-07-19 19:37:45 +00:00
|
|
|
"tests/RegsStepIfSignalHandlerTest.cpp",
|
2017-01-20 04:08:48 +00:00
|
|
|
"tests/RegsTest.cpp",
|
2017-04-04 21:06:58 +00:00
|
|
|
"tests/SymbolsTest.cpp",
|
2019-01-24 20:22:03 +00:00
|
|
|
"tests/TestUtils.cpp",
|
2017-11-29 03:14:54 +00:00
|
|
|
"tests/UnwindOfflineTest.cpp",
|
2017-07-07 23:35:48 +00:00
|
|
|
"tests/UnwindTest.cpp",
|
2017-09-26 02:23:07 +00:00
|
|
|
"tests/UnwinderTest.cpp",
|
2019-08-30 21:02:19 +00:00
|
|
|
"tests/VerifyBionicTerminationTest.cpp",
|
2017-01-20 04:08:48 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
cflags: [
|
|
|
|
"-O0",
|
|
|
|
"-g",
|
|
|
|
],
|
|
|
|
|
|
|
|
shared_libs: [
|
|
|
|
"libbase",
|
|
|
|
"liblog",
|
2017-06-28 21:51:54 +00:00
|
|
|
"liblzma",
|
2017-07-11 22:29:32 +00:00
|
|
|
"libunwindstack",
|
2018-12-19 14:28:33 +00:00
|
|
|
"libdexfile_support",
|
2017-01-20 04:08:48 +00:00
|
|
|
],
|
|
|
|
|
2017-05-11 01:34:15 +00:00
|
|
|
static_libs: [
|
|
|
|
"libgmock",
|
|
|
|
],
|
|
|
|
|
2018-04-27 23:12:06 +00:00
|
|
|
test_suites: ["device-tests"],
|
2017-06-28 21:51:54 +00:00
|
|
|
data: [
|
2017-07-01 00:18:16 +00:00
|
|
|
"tests/files/elf32.xz",
|
|
|
|
"tests/files/elf64.xz",
|
2018-03-15 01:16:22 +00:00
|
|
|
"tests/files/offline/art_quick_osr_stub_arm/*",
|
2018-01-24 16:52:47 +00:00
|
|
|
"tests/files/offline/bad_eh_frame_hdr_arm64/*",
|
|
|
|
"tests/files/offline/debug_frame_first_x86/*",
|
2018-06-06 21:47:31 +00:00
|
|
|
"tests/files/offline/debug_frame_load_bias_arm/*",
|
2019-10-22 01:59:42 +00:00
|
|
|
"tests/files/offline/eh_frame_bias_x86/*",
|
2018-02-09 23:57:39 +00:00
|
|
|
"tests/files/offline/eh_frame_hdr_begin_x86_64/*",
|
2020-01-22 20:17:06 +00:00
|
|
|
"tests/files/offline/empty_arm64/*",
|
2019-06-11 01:37:32 +00:00
|
|
|
"tests/files/offline/invalid_elf_offset_arm/*",
|
2018-02-05 21:07:06 +00:00
|
|
|
"tests/files/offline/jit_debug_arm/*",
|
|
|
|
"tests/files/offline/jit_debug_x86/*",
|
2018-02-23 01:11:31 +00:00
|
|
|
"tests/files/offline/jit_map_arm/*",
|
2018-02-05 21:07:06 +00:00
|
|
|
"tests/files/offline/gnu_debugdata_arm/*",
|
2019-10-03 20:35:48 +00:00
|
|
|
"tests/files/offline/load_bias_different_section_bias_arm64/*",
|
2019-07-05 15:48:04 +00:00
|
|
|
"tests/files/offline/load_bias_ro_rx_x86_64/*",
|
2018-05-18 01:37:38 +00:00
|
|
|
"tests/files/offline/offset_arm/*",
|
2018-12-10 19:13:23 +00:00
|
|
|
"tests/files/offline/shared_lib_in_apk_arm64/*",
|
|
|
|
"tests/files/offline/shared_lib_in_apk_memory_only_arm64/*",
|
2019-03-12 22:17:36 +00:00
|
|
|
"tests/files/offline/shared_lib_in_apk_single_map_arm64/*",
|
2019-12-04 21:37:11 +00:00
|
|
|
"tests/files/offline/signal_load_bias_arm/*",
|
2018-02-05 21:07:06 +00:00
|
|
|
"tests/files/offline/straddle_arm/*",
|
2017-11-29 03:14:54 +00:00
|
|
|
"tests/files/offline/straddle_arm64/*",
|
2017-06-28 21:51:54 +00:00
|
|
|
],
|
2020-04-07 21:04:46 +00:00
|
|
|
|
2020-04-23 15:49:12 +00:00
|
|
|
target: {
|
|
|
|
android: {
|
|
|
|
header_libs: ["bionic_libc_platform_headers"],
|
|
|
|
product_variables: {
|
|
|
|
experimental_mte: {
|
|
|
|
cflags: ["-DANDROID_EXPERIMENTAL_MTE"],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
linux_bionic: {
|
|
|
|
header_libs: ["bionic_libc_platform_headers"],
|
|
|
|
product_variables: {
|
|
|
|
experimental_mte: {
|
|
|
|
cflags: ["-DANDROID_EXPERIMENTAL_MTE"],
|
|
|
|
},
|
|
|
|
},
|
2020-04-07 21:04:46 +00:00
|
|
|
},
|
|
|
|
},
|
2019-09-03 17:18:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
cc_test {
|
|
|
|
name: "libunwindstack_test",
|
|
|
|
defaults: ["libunwindstack_testlib_flags"],
|
|
|
|
isolated: true,
|
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"tests/LocalUnwinderTest.cpp",
|
|
|
|
],
|
2018-06-06 17:48:41 +00:00
|
|
|
required: [
|
|
|
|
"libunwindstack_local",
|
|
|
|
],
|
2017-01-20 04:08:48 +00:00
|
|
|
}
|
2017-02-01 23:44:40 +00:00
|
|
|
|
2019-09-03 17:18:42 +00:00
|
|
|
// Skip LocalUnwinderTest until atest understands required properly.
|
|
|
|
cc_test {
|
|
|
|
name: "libunwindstack_unit_test",
|
|
|
|
defaults: ["libunwindstack_testlib_flags"],
|
|
|
|
isolated: true,
|
|
|
|
}
|
|
|
|
|
2020-05-28 21:23:10 +00:00
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// Fuzzers
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
cc_defaults {
|
|
|
|
name: "libunwindstack_fuzz_defaults",
|
|
|
|
host_supported: true,
|
|
|
|
defaults: ["libunwindstack_flags"],
|
|
|
|
cflags: [
|
|
|
|
"-Wno-exit-time-destructors",
|
|
|
|
"-g",
|
|
|
|
],
|
|
|
|
shared_libs: [
|
|
|
|
"libbase",
|
|
|
|
"liblog",
|
|
|
|
"liblzma",
|
|
|
|
"libunwindstack",
|
|
|
|
"libdexfile_support",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
cc_fuzz {
|
|
|
|
name: "libunwindstack_fuzz_unwinder",
|
|
|
|
defaults: ["libunwindstack_fuzz_defaults"],
|
|
|
|
srcs: [
|
|
|
|
"tests/MemoryFake.cpp",
|
|
|
|
"tests/ElfFake.cpp",
|
|
|
|
"tests/fuzz/UnwinderComponentCreator.cpp",
|
|
|
|
"tests/fuzz/UnwinderFuzz.cpp",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2017-02-01 23:44:40 +00:00
|
|
|
//-------------------------------------------------------------------------
|
2017-07-12 22:40:52 +00:00
|
|
|
// Tools
|
2017-02-01 23:44:40 +00:00
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
cc_defaults {
|
2017-07-12 22:40:52 +00:00
|
|
|
name: "libunwindstack_tools",
|
2017-02-01 23:44:40 +00:00
|
|
|
defaults: ["libunwindstack_flags"],
|
|
|
|
|
|
|
|
shared_libs: [
|
|
|
|
"libunwindstack",
|
|
|
|
"libbase",
|
2017-06-28 21:51:54 +00:00
|
|
|
"liblzma",
|
2017-02-01 23:44:40 +00:00
|
|
|
],
|
2018-05-21 15:24:20 +00:00
|
|
|
target: {
|
|
|
|
// Always disable optimizations for host to make it easier to debug.
|
|
|
|
host: {
|
|
|
|
cflags: [
|
|
|
|
"-O0",
|
|
|
|
"-g",
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2017-07-12 22:40:52 +00:00
|
|
|
}
|
2017-02-01 23:44:40 +00:00
|
|
|
|
2017-07-12 22:40:52 +00:00
|
|
|
cc_binary {
|
|
|
|
name: "unwind",
|
|
|
|
defaults: ["libunwindstack_tools"],
|
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"tools/unwind.cpp",
|
2017-02-01 23:44:40 +00:00
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
cc_binary {
|
|
|
|
name: "unwind_info",
|
2017-07-12 22:40:52 +00:00
|
|
|
defaults: ["libunwindstack_tools"],
|
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"tools/unwind_info.cpp",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
|
|
|
cc_binary {
|
|
|
|
name: "unwind_symbols",
|
|
|
|
defaults: ["libunwindstack_tools"],
|
2017-02-01 23:44:40 +00:00
|
|
|
|
|
|
|
srcs: [
|
2017-07-12 22:40:52 +00:00
|
|
|
"tools/unwind_symbols.cpp",
|
2017-02-01 23:44:40 +00:00
|
|
|
],
|
|
|
|
}
|
2017-06-28 21:51:54 +00:00
|
|
|
|
2017-12-16 04:00:59 +00:00
|
|
|
cc_binary {
|
|
|
|
name: "unwind_for_offline",
|
|
|
|
defaults: ["libunwindstack_tools"],
|
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"tools/unwind_for_offline.cpp",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2018-02-09 23:57:39 +00:00
|
|
|
cc_binary {
|
|
|
|
name: "unwind_reg_info",
|
|
|
|
defaults: ["libunwindstack_tools"],
|
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"tools/unwind_reg_info.cpp",
|
|
|
|
],
|
|
|
|
}
|
|
|
|
|
2018-11-14 23:36:45 +00:00
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
// Benchmarks
|
|
|
|
//-------------------------------------------------------------------------
|
|
|
|
cc_benchmark {
|
|
|
|
name: "unwind_benchmarks",
|
|
|
|
host_supported: true,
|
|
|
|
defaults: ["libunwindstack_flags"],
|
|
|
|
|
|
|
|
// Disable optimizations so that all of the calls are not optimized away.
|
|
|
|
cflags: [
|
|
|
|
"-O0",
|
|
|
|
],
|
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"benchmarks/unwind_benchmarks.cpp",
|
2020-04-14 15:59:27 +00:00
|
|
|
"benchmarks/ElfBenchmark.cpp",
|
2020-05-04 20:46:09 +00:00
|
|
|
"benchmarks/MapsBenchmark.cpp",
|
2020-04-14 18:59:15 +00:00
|
|
|
"benchmarks/SymbolBenchmark.cpp",
|
2020-04-14 15:59:27 +00:00
|
|
|
"benchmarks/Utils.cpp",
|
2020-04-14 18:59:15 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
data: [
|
|
|
|
"benchmarks/files/*",
|
2018-11-14 23:36:45 +00:00
|
|
|
],
|
|
|
|
|
|
|
|
shared_libs: [
|
2019-01-17 01:23:39 +00:00
|
|
|
"libbase",
|
2018-11-14 23:36:45 +00:00
|
|
|
"libunwindstack",
|
|
|
|
],
|
2020-04-14 18:59:15 +00:00
|
|
|
|
|
|
|
target: {
|
|
|
|
android: {
|
|
|
|
static_libs: [
|
|
|
|
"libmeminfo",
|
|
|
|
"libprocinfo",
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
2018-11-14 23:36:45 +00:00
|
|
|
}
|
|
|
|
|
2017-06-28 21:51:54 +00:00
|
|
|
// Generates the elf data for use in the tests for .gnu_debugdata frames.
|
|
|
|
// Once these files are generated, use the xz command to compress the data.
|
|
|
|
cc_binary_host {
|
|
|
|
name: "gen_gnudebugdata",
|
2017-07-11 22:29:32 +00:00
|
|
|
defaults: ["libunwindstack_flags"],
|
2017-06-28 21:51:54 +00:00
|
|
|
|
|
|
|
srcs: [
|
|
|
|
"tests/GenGnuDebugdata.cpp",
|
|
|
|
],
|
|
|
|
}
|
2020-05-28 21:23:10 +00:00
|
|
|
|