af76dd6e7e
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}
39 lines
1.1 KiB
Python
39 lines
1.1 KiB
Python
#!/usr/bin/env python
|
|
# 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.
|
|
|
|
"""This program copies dbgeng.dll from the Windows SDK to the output directory,
|
|
so that we can test v8windbg. (The version of dbgeng.dll in system32, which
|
|
would be loaded otherwise, is insufficient.)
|
|
Arguments:
|
|
1. The directory that contains vs_toolchain.py
|
|
2. The directory to copy to
|
|
3. The cpu type for this build
|
|
"""
|
|
|
|
import sys
|
|
import os
|
|
|
|
vs_toolchain_dir, target_dir, target_cpu = sys.argv[1:]
|
|
|
|
sys.path.insert(0, vs_toolchain_dir)
|
|
import vs_toolchain
|
|
|
|
def CopyDebuggerFile(debug_file):
|
|
win_sdk_dir = vs_toolchain.SetEnvironmentAndGetSDKDir()
|
|
if not win_sdk_dir:
|
|
return
|
|
|
|
full_path = os.path.join(win_sdk_dir, 'Debuggers', target_cpu, debug_file)
|
|
if not os.path.exists(full_path):
|
|
return
|
|
|
|
target_path = os.path.join(target_dir, debug_file)
|
|
vs_toolchain._CopyRuntimeImpl(target_path, full_path, verbose=False)
|
|
|
|
# Ninja expects the file's timestamp to be newer than this script.
|
|
os.utime(target_path, None)
|
|
|
|
CopyDebuggerFile('dbgeng.dll')
|