Index: build/vs_toolchain.py |
diff --git a/build/vs_toolchain.py b/build/vs_toolchain.py |
index 2f1ef1735752a526f959a02690fa18fd1e0e8fcf..e131a0db2b428084884a72ac7caaca4ddb378a1d 100755 |
--- a/build/vs_toolchain.py |
+++ b/build/vs_toolchain.py |
@@ -311,7 +311,7 @@ def CopyDlls(target_dir, configuration, target_cpu): |
def _CopyDebugger(target_dir, target_cpu): |
- """Copy dbghelp.dll into the requested directory as needed. |
+ """Copy dbghelp.dll and dbgcore.dll into the requested directory as needed. |
target_cpu is one of 'x86' or 'x64'. |
@@ -319,19 +319,23 @@ def _CopyDebugger(target_dir, target_cpu): |
from the SDK directory avoids using the system copy of dbghelp.dll which then |
ensures compatibility with recent debug information formats, such as VS |
2017 /debug:fastlink PDBs. |
+ |
+ dbgcore.dll is needed when using some functions from dbghelp.dll (like |
+ MinidumpWriteDump). |
""" |
win_sdk_dir = SetEnvironmentAndGetSDKDir() |
if not win_sdk_dir: |
return |
- debug_file = 'dbghelp.dll' |
- full_path = os.path.join(win_sdk_dir, 'Debuggers', target_cpu, debug_file) |
- if not os.path.exists(full_path): |
- raise Exception('dbghelp.dll not found in "%s"\r\nYou must install the ' |
- '"Debugging Tools for Windows" feature from the Windows ' |
- '10 SDK.' % full_path) |
- target_path = os.path.join(target_dir, debug_file) |
- _CopyRuntimeImpl(target_path, full_path) |
+ debug_files = ['dbghelp.dll', 'dbgcore.dll'] |
+ for debug_file in debug_files: |
+ full_path = os.path.join(win_sdk_dir, 'Debuggers', target_cpu, debug_file) |
+ if not os.path.exists(full_path): |
+ raise Exception('%s not found in "%s"\r\nYou must install the ' |
+ '"Debugging Tools for Windows" feature from the Windows ' |
+ '10 SDK.' % (debug_file, full_path)) |
+ target_path = os.path.join(target_dir, debug_file) |
+ _CopyRuntimeImpl(target_path, full_path) |
def _GetDesiredVsToolchainHashes(): |