blob: 74b8aab1cb427e90cb42a6b2180748109d073266 [file] [log] [blame]
# Copyright 2016 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# A collection of utilities useful to debuggers and similar programs.
static_library("debugger_utils") {
sources = [
"build_ids.cc",
"build_ids.h",
"byte_block.h",
"byte_block_file.cc",
"byte_block_file.h",
"elf_reader.cc",
"elf_reader.h",
"elf_symtab.cc",
"elf_symtab.h",
"ktrace_reader.cc",
"ktrace_reader.h",
"load_maps.cc",
"load_maps.h",
"util.cc",
"util.h",
]
if (is_fuchsia) {
sources += [
"dso_list.cc",
"dso_list.h",
"util_zx.cc",
]
}
if (current_cpu == "x64") {
sources += [
"x86_cpuid.cc",
"x86_cpuid.h",
"x86_pt.cc",
"x86_pt.h",
]
}
deps = [
"//garnet/public/lib/fxl",
]
if (is_fuchsia) {
deps += [ "//zircon/public/lib/zx" ]
} else {
deps += [ "//zircon/system/public" ]
}
}
group("tests") {
testonly = true
deps = [
":util-unittests",
]
}
executable("util-unittests") {
testonly = true
sources = [
"run_all_unittests.cc",
"util.cc",
"util.h",
"util_unittest.cc",
"util_zx.cc",
]
deps = [
":debugger_utils",
"//garnet/public/lib/fxl",
"//third_party/googletest:gtest",
]
libs = [ "zircon" ]
}