• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2019 Google LLC
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15load("@com_google_sandboxed_api//sandboxed_api/bazel:build_defs.bzl", "sapi_platform_copts")
16load("@com_google_sandboxed_api//sandboxed_api/bazel:proto.bzl", "sapi_proto_library")
17
18package(default_visibility = [
19    "@com_google_sandboxed_api//sandboxed_api/sandbox2:__subpackages__",
20])
21
22licenses(["notice"])
23
24cc_library(
25    name = "ptrace_hook",
26    srcs = ["ptrace_hook.cc"],
27    hdrs = ["ptrace_hook.h"],
28    copts = sapi_platform_copts(),
29    deps = [
30        "@com_google_absl//absl/strings",
31        "@com_google_sandboxed_api//sandboxed_api/sandbox2/util:syscall_trap",
32    ],
33)
34
35cc_library(
36    name = "unwind",
37    srcs = ["unwind.cc"],
38    hdrs = ["unwind.h"],
39    copts = sapi_platform_copts(),
40    visibility = ["//visibility:public"],
41    deps = [
42        ":ptrace_hook",
43        ":unwind_cc_proto",
44        "@com_google_absl//absl/cleanup",
45        "@com_google_absl//absl/status",
46        "@com_google_absl//absl/status:statusor",
47        "@com_google_absl//absl/strings",
48        "@com_google_sandboxed_api//sandboxed_api:config",
49        "@com_google_sandboxed_api//sandboxed_api/sandbox2:comms",
50        "@com_google_sandboxed_api//sandboxed_api/sandbox2/util:maps_parser",
51        "@com_google_sandboxed_api//sandboxed_api/sandbox2/util:minielf",
52        "@com_google_sandboxed_api//sandboxed_api/util:file_helpers",
53        "@com_google_sandboxed_api//sandboxed_api/util:raw_logging",
54        "@com_google_sandboxed_api//sandboxed_api/util:status",
55        "@org_gnu_libunwind//:unwind-ptrace",
56    ],
57)
58
59sapi_proto_library(
60    name = "unwind_proto",
61    srcs = ["unwind.proto"],
62)
63