blob: 017863cdd3fc6d059bb8ffe6cd0abf61eaf2704c [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",
"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",
]
if (is_fuchsia) {
public_deps += [ "//zircon/public/lib/zx" ]
} else {
deps += [ "//zircon/system/public" ]
}
}
executable("tests") {
testonly = true
output_name = "debugger_utils_tests"
sources = [
"run_all_unittests.cc",
"jobs.cc",
"jobs.h",
"jobs_unittest.cc",
"sysinfo.cc",
"sysinfo.h",
"util.cc",
"util.h",
"util_unittest.cc",
"util_zx.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"
},
]
}