blob: a069dfedc3f50638beff244e22aad05a4d2f2e95 [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.
import("//build/package.gni")
# 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",
"jobs.cc",
"jobs.h",
"sysinfo.cc",
"sysinfo.h",
"threads.cc",
"threads.h",
"util_zx.cc",
]
}
if (current_cpu == "x64") {
sources += [
"x86_cpuid.cc",
"x86_cpuid.h",
"x86_pt.cc",
"x86_pt.h",
]
}
public_deps = [
"//zircon/public/lib/zircon-internal",
]
deps = [
"//garnet/public/lib/fxl",
"//zircon/public/lib/fit",
]
if (is_fuchsia) {
public_deps += [
"//zircon/public/fidl/fuchsia-sysinfo:fuchsia-sysinfo_c",
"//zircon/public/lib/fdio",
"//zircon/public/lib/zx",
]
} else {
deps += [ "//zircon/system/public" ]
}
}
executable("tests") {
testonly = true
output_name = "debugger_utils_tests"
sources = [
"jobs.cc",
"jobs.h",
"jobs_unittest.cc",
"run_all_unittests.cc",
"sysinfo.cc",
"sysinfo.h",
"threads.cc",
"threads.h",
"threads_unittest.cc",
"util.cc",
"util.h",
"util_unittest.cc",
"util_zx.cc",
"util_zx_unittest.cc",
]
deps = [
":debugger_utils",
"//garnet/public/lib/fxl",
"//third_party/googletest:gtest",
]
libs = [ "zircon" ]
}
package("debugger_utils_tests") {
testonly = true
deps = [
":tests",
]
tests = [
{
name = "debugger_utils_tests"
},
]
}