v8/tools/v8windbg/BUILD.gn
Seth Brenith af76dd6e7e [tools] Add v8windbg, a WinDbg extension for V8
Please take a look at tools/v8windbg/README.md for an overview of what
v8windbg can do and how it's structured. This platform-specific
debugging plugin makes use of the data provided by the V8 postmortem
debugging API in tools/debug_helper.

Note: This code began as https://github.com/billti/v8dbg and then moved
into the Edge repository, where I added features gradually and got code
reviews for individual changes. Now, taken in its entirety, it's an
obnoxiously large CL. I'm open to breaking it up into a few chunks if
that would be preferable.

Bug: v8:9376
Change-Id: I3e503de00bb1aea870ae83e9bd99e4e2eab9ef98
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2031700
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Tamer Tas <tmrts@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#66319}
2020-02-18 19:16:18 +00:00

117 lines
2.4 KiB
Plaintext

# Copyright 2020 the V8 project 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("../../gni/v8.gni")
config("v8windbg_config") {
# Required for successful compilation of SDK header file DbgModel.h.
cflags_cc = [ "/Zc:twoPhase-" ]
include_dirs = [ "../.." ]
}
# Basic support for WinDbg extensions, with nothing specific to V8.
source_set("v8windbg_base") {
testonly = true
sources = [
"base/dbgext.cc",
"base/dbgext.h",
"base/utilities.cc",
"base/utilities.h",
]
libs = [
"DbgEng.lib",
"DbgModel.lib",
"RuntimeObject.lib",
"comsuppwd.lib",
]
public_configs = [ ":v8windbg_config" ]
}
# An extension DLL that can be loaded into WinDbg with `.load v8windbg`.
v8_shared_library("v8windbg") {
testonly = true
sources = [
"base/dbgext.def",
"src/cur-isolate.cc",
"src/cur-isolate.h",
"src/list-chunks.cc",
"src/list-chunks.h",
"src/local-variables.cc",
"src/local-variables.h",
"src/object-inspection.cc",
"src/object-inspection.h",
"src/v8-debug-helper-interop.cc",
"src/v8-debug-helper-interop.h",
"src/v8windbg-extension.cc",
"src/v8windbg-extension.h",
]
deps = [
":v8windbg_base",
"../debug_helper:v8_debug_helper",
]
}
# Copies Windows SDK files that v8windbg_test needs.
action("copy_prereqs") {
testonly = true
script = "copy-prereqs.py"
inputs = [
script,
"//build/vs_toolchain.py",
]
outputs = [ "$root_out_dir/dbgeng.dll" ]
args = [
rebase_path("//build"),
rebase_path(root_out_dir),
target_cpu,
]
}
# A test that launches a separate d8 process and debugs it using v8windbg.
v8_source_set("v8windbg_test") {
testonly = true
sources = [
"test/debug-callbacks.cc",
"test/debug-callbacks.h",
"test/v8windbg-test.cc",
"test/v8windbg-test.h",
]
deps = [ "../..:v8_libbase" ] # For CHECK macro.
data_deps = [
":copy_prereqs",
":v8windbg",
":v8windbg_test_script",
"../..:d8",
]
libs = [
"DbgEng.lib",
"DbgModel.lib",
"Pathcch.lib",
"RuntimeObject.lib",
]
configs = [ ":v8windbg_config" ]
}
# Copies the JavaScript file used by v8windbg_test.
copy("v8windbg_test_script") {
testonly = true
sources = [ "test/script.js" ]
outputs = [ "$target_out_dir/v8windbg-test-script.js" ]
}