Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1376)

Unified Diff: build/win/copy_cdb_to_output.py

Issue 2092083004: Copy more helper DLLs for cdb.exe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/chrome_tests.gypi » ('j') | tools/perf/chrome_telemetry_build/BUILD.gn » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/win/copy_cdb_to_output.py
diff --git a/build/win/copy_cdb_to_output.py b/build/win/copy_cdb_to_output.py
index e9985de52968668a9b17118ba7754f69d274fbae..ea6ab3f4b304c1cf5fa0f28dfe6156362d5c038d 100755
--- a/build/win/copy_cdb_to_output.py
+++ b/build/win/copy_cdb_to_output.py
@@ -43,6 +43,11 @@ def _CopyImpl(file_name, target_dir, source_dir, verbose=False):
shutil.copy(source, target)
+def _ConditionalMkdir(output_dir):
+ if not os.path.isdir(output_dir):
+ os.makedirs(output_dir)
+
+
def _CopyCDBToOutput(output_dir, target_arch):
"""Copies the Windows debugging executable cdb.exe to the output
directory, which is created if it does not exist. The output
@@ -50,8 +55,7 @@ def _CopyCDBToOutput(output_dir, target_arch):
passed. Supported values for the target architecture are the GYP
values "ia32" and "x64" and the GN values "x86" and "x64".
"""
- if not os.path.isdir(output_dir):
- os.makedirs(output_dir)
+ _ConditionalMkdir(output_dir)
vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs()
# If WINDOWSSDKDIR is not set use the default SDK path. This will be the case
# when DEPOT_TOOLS_WIN_TOOLCHAIN=0 and vcvarsall.bat has not been run.
@@ -67,12 +71,24 @@ def _CopyCDBToOutput(output_dir, target_arch):
sys.exit(1)
# We need to copy multiple files, so cache the computed source directory.
src_dir = os.path.join(win_sdk_dir, 'Debuggers', src_arch)
+ # We need to copy some helper DLLs to get access to the !uniqstack
+ # command to dump all threads' stacks.
+ src_winext_dir = os.path.join(src_dir, 'winext')
+ dst_winext_dir = os.path.join(output_dir, 'winext')
+ src_winxp_dir = os.path.join(src_dir, 'winxp')
scottmg 2016/06/25 02:00:20 We shouldn't need winxp\ ?
Ken Russell (switch to Gerrit) 2016/06/27 18:46:36 That directory contains two of the CDB plugin DLLs
+ dst_winxp_dir = os.path.join(output_dir, 'winxp')
+ _ConditionalMkdir(dst_winext_dir)
+ _ConditionalMkdir(dst_winxp_dir)
# Note that the outputs from the "copy_cdb_to_output" target need to
# be kept in sync with this list.
_CopyImpl('cdb.exe', output_dir, src_dir)
_CopyImpl('dbgeng.dll', output_dir, src_dir)
_CopyImpl('dbghelp.dll', output_dir, src_dir)
_CopyImpl('dbgmodel.dll', output_dir, src_dir)
+ _CopyImpl('ext.dll', dst_winext_dir, src_winext_dir)
+ _CopyImpl('uext.dll', dst_winext_dir, src_winext_dir)
+ _CopyImpl('exts.dll', dst_winxp_dir, src_winxp_dir)
+ _CopyImpl('ntsdexts.dll', dst_winxp_dir, src_winxp_dir)
return 0
« no previous file with comments | « no previous file | chrome/chrome_tests.gypi » ('j') | tools/perf/chrome_telemetry_build/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698