@echo off setlocal :parse if /I .%1==./1394 ( set ConnectArgs=1394:channel=0 shift goto :parse ) else if /I .%1==./com1 ( set ConnectArgs=com:port=\\.\com1,baud=115200 shift goto :parse ) else if /I .%1==./com2 ( set ConnectArgs=com:port=\\.\com2,baud=115200 shift goto :parse ) else if /I .%1==./pipe ( set ConnectArgs=com:pipe,port=\\.\pipe\kd,resets=0,reconnect shift goto :parse ) if not defined ConnectArgs ( call :Usage %0 exit /b 1 ) @rem Read object file paths generated by build process call %SINGULARITY_ROOT%\buildcfg.cmd if ErrorLevel 1 ( echo %SINGULARITY_ROOT%\buildcfg.cmd failed. exit /b 1 ) start windbg.exe -k %ConnectArgs% -WX -W %SINGULARITY_ROOT%:%BUILDTYPE% -d -c "g" %1 %2 %3 %4 %5 %6 %7 %8 %9 exit /b 0 :Usage echo.Usage: echo. %~nx1 ^ echo. echo.where ^ is one of: echo. /1394 ^| /com1 ^| /com2 ^| /pipe