private string GetCommandLineForLaunch(bool fNoDebug, Debugger.PlatformInfo.Emulator emulatorConfig, bool fIsTargetBigEndian) { CommandLineBuilder cb = new CommandLineBuilder(); if (emulatorConfig != null && !string.IsNullOrEmpty(emulatorConfig.additionalOptions)) { CommandLineBuilder cbT = new CommandLineBuilder(emulatorConfig.additionalOptions); cb.AddArguments(cbT.Arguments); } if (emulatorConfig != null && emulatorConfig.legacyCommandLine) { GetCommandLineForLaunchLegacy(fNoDebug, emulatorConfig, cb, fIsTargetBigEndian); } else { GetCommandLineForLaunch(fNoDebug, emulatorConfig, cb, fIsTargetBigEndian); } string commandLine = cb.ToString(); commandLine = Environment.ExpandEnvironmentVariables(commandLine); return(commandLine); }
private void GetCommandLineForLaunch(bool fNoDebug, Debugger.PlatformInfo.Emulator emulatorConfig, Debugger.CommandLineBuilder cb, bool fIsTargetBigEndian) { if (emulatorConfig != null) { if (!string.IsNullOrEmpty(emulatorConfig.config)) { cb.AddArguments("/config:" + emulatorConfig.config); } } if (!fNoDebug) { cb.AddArguments("/waitfordebugger"); } foreach (string assembly in m_project.GetDependencies(true, true, fIsTargetBigEndian)) { cb.AddArguments("/load:" + assembly); } string args = this.m_project.ProjectProperties.ActiveConfigurationSettings.StartArguments; args = args.Trim(); if (args.Length > 0) { cb.AddArguments("/commandlinearguments:" + args); } }
private void GetCommandLineForLaunchLegacy(bool fNoDebug, Debugger.PlatformInfo.Emulator emulatorConfig, Debugger.CommandLineBuilder cb, bool fIsTargetBigEndian) { #if DEBUG // TRACE has been removed from release builds cb.AddArguments("-Trace_MemoryStats", Utility.Boolean.BoolToInt(true)); #endif if (!fNoDebug) { cb.AddArguments("-PipeName", ""); } #if DEBUG cb.AddArguments("-Force_Compaction", Utility.Boolean.BoolToInt(true)); #endif string deviceCfg = Environment.GetEnvironmentVariable("CLRROOT"); if (deviceCfg != null) { deviceCfg = Path.Combine(deviceCfg, "test.devicecfg"); if (File.Exists(deviceCfg)) { cb.AddArguments("-devicecfg", deviceCfg); } } foreach (string assembly in m_project.GetDependencies(true, true, fIsTargetBigEndian)) { cb.AddArguments("-load", assembly); } string args = this.m_project.ProjectProperties.ActiveConfigurationSettings.StartArguments; args = args.Trim(); if (args.Length > 0) { cb.AddArguments("-commandLineArgs", args); } cb.AddArguments("-resolve"); cb.AddArguments("-execute"); }