Adds rust-windbg.cmd script

This commit is contained in:
Andrew Gaspar 2017-02-20 11:10:32 -08:00 committed by Alex Crichton
parent 63c77214c1
commit 70e673952e
2 changed files with 24 additions and 1 deletions

View File

@ -254,7 +254,12 @@ pub fn debugger_scripts(build: &Build,
install(&build.src.join("src/etc/").join(file), &dst, 0o644);
};
if host.contains("windows-msvc") {
// no debugger scripts
// windbg debugger scripts
install(&build.src.join("src/etc/rust-windbg.cmd"), &sysroot.join("bin"),
0o755);
cp_debugger_script("natvis/libcore.natvis");
cp_debugger_script("natvis/libcollections.natvis");
} else {
cp_debugger_script("debugger_pretty_printers_common.py");

18
src/etc/rust-windbg.cmd Normal file
View File

@ -0,0 +1,18 @@
@echo off
setlocal
REM Copyright 2014 The Rust Project Developers. See the COPYRIGHT
REM file at the top-level directory of this distribution and at
REM http://rust-lang.org/COPYRIGHT.
REM
REM Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
REM http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
REM <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
REM option. This file may not be copied, modified, or distributed
REM except according to those terms.
for /f "delims=" %%i in ('rustc --print=sysroot') do set rustc_sysroot=%%i
set rust_etc=%rustc_sysroot%\lib\rustlib\etc
windbg -c ".nvload %rust_etc%\libcore.natvis;.nvload %rust_etc%\libcollections.natvis;" %*