blob: ac8a9587cdf3d3393bb848fcb38d772126d98ea6 [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")
executable("bin") {
# This is called debugserver and not gdbserver because it is not intended
# to be gdb specific. E.g., The GDB Remote Serial Protocol is used by other
# debuggers, e.g., lldb.
output_name = "debugserver"
sources = [
"cmd_handler.cc",
"cmd_handler.h",
"io_loop.cc",
"io_loop.h",
"main.cc",
"server.cc",
"server.h",
"stop_reply_packet.cc",
"stop_reply_packet.h",
"thread_action_list.cc",
"thread_action_list.h",
"util.cc",
"util.h",
]
deps = [
"//garnet/lib/debugger_utils",
"//garnet/lib/inferior_control",
"//garnet/public/lib/component/cpp:environment_services",
"//garnet/public/lib/fsl",
"//garnet/public/lib/fxl",
"//garnet/public/lib/svc/cpp",
"//zircon/public/lib/async-loop-cpp",
"//zircon/public/lib/zx",
]
public_deps = [
"//zircon/public/lib/fit",
]
libs = [ "zircon" ]
}
group("tests") {
testonly = true
public_deps = [
":debugserver-unittests",
"test_apps",
]
}
executable("debugserver-unittests") {
testonly = true
sources = [
"run_all_unittests.cc",
"stop_reply_packet.cc",
"stop_reply_packet.h",
"stop_reply_packet_unittest.cc",
"thread_action_list.cc",
"thread_action_list.h",
"thread_action_list_unittest.cc",
"util.cc",
"util.h",
"util_unittest.cc",
]
deps = [
"//garnet/lib/debugger_utils",
"//garnet/public/lib/fxl",
"//third_party/googletest:gtest",
]
libs = [ "zircon" ]
}
package("debugserver") {
deprecated_system_image = true
deps = [
":bin",
]
binaries = [
{
name = "debugserver"
},
]
}
package("debugserver_tests") {
testonly = true
deps = [
":tests",
]
tests = [
{
name = "debugserver-unittests"
},
]
# These have been very useful with interactive debugging/testing.
binaries = [
{
name = "exit-test"
},
{
name = "crash-test"
},
{
name = "loop-test"
},
{
name = "syscall-test"
},
{
name = "thread-test"
},
]
}