This commit is contained in:
mterwoord_cp 2010-08-11 07:52:11 +00:00
parent 99c7f96792
commit f19e133ef6
6 changed files with 91 additions and 78 deletions

View file

@ -6,6 +6,8 @@ using Microsoft.VisualStudio;
using Microsoft.VisualStudio.Debugger.Interop; using Microsoft.VisualStudio.Debugger.Interop;
using System.Diagnostics; using System.Diagnostics;
using System.Threading; using System.Threading;
using System.Collections.Specialized;
using Cosmos.Debug.Common;
namespace Cosmos.Debug.VSDebugEngine namespace Cosmos.Debug.VSDebugEngine
{ {
@ -355,6 +357,9 @@ namespace Cosmos.Debug.VSDebugEngine
{ {
m_engineCallback = new EngineCallback(this, aAD7Callback); m_engineCallback = new EngineCallback(this, aAD7Callback);
var xDebugInfo = new NameValueCollection();
NameValueCollectionHelper.LoadFromString(xDebugInfo, aDebugInfo);
//string commandLine = EngineUtils.BuildCommandLine(exe, args); //string commandLine = EngineUtils.BuildCommandLine(exe, args);
//ProcessLaunchInfo processLaunchInfo = new ProcessLaunchInfo(exe, commandLine, dir, env, options, launchFlags, hStdInput, hStdOutput, hStdError); //ProcessLaunchInfo processLaunchInfo = new ProcessLaunchInfo(exe, commandLine, dir, env, options, launchFlags, hStdInput, hStdOutput, hStdError);
// We are being asked to debug a process when we currently aren't debugging anything // We are being asked to debug a process when we currently aren't debugging anything
@ -365,9 +370,8 @@ namespace Cosmos.Debug.VSDebugEngine
// var m_debuggedProcess = Worker.LaunchProcess(m_engineCallback, processLaunchInfo); // var m_debuggedProcess = Worker.LaunchProcess(m_engineCallback, processLaunchInfo);
//})); //}));
AD7EngineCreateEvent.Send(this); AD7EngineCreateEvent.Send(this);
var xProcess = new AD7Process(aDebugInfo, m_engineCallback, this, aPort); var xProcess = new AD7Process(xDebugInfo, m_engineCallback, this, aPort);
aProcess = xProcess; aProcess = xProcess;
mProcess = xProcess; mProcess = xProcess;
m_ad7ProgramId = xProcess.mID; m_ad7ProgramId = xProcess.mID;

View file

@ -123,12 +123,13 @@ namespace Cosmos.Debug.VSDebugEngine {
public string mISO; public string mISO;
public string mProjectFile; public string mProjectFile;
internal AD7Process(string aDebugInfo, EngineCallback aCallback, AD7Engine aEngine, IDebugPort2 aPort) { internal AD7Process(NameValueCollection aDebugInfo, EngineCallback aCallback, AD7Engine aEngine, IDebugPort2 aPort)
{
mCallback = aCallback; mCallback = aCallback;
// Load passed in values // Load passed in values
mDebugInfo = new NameValueCollection(); mDebugInfo = aDebugInfo;
NameValueCollectionHelper.LoadFromString(mDebugInfo, aDebugInfo);
// //
mISO = mDebugInfo["ISOFile"]; mISO = mDebugInfo["ISOFile"];
mProjectFile = mDebugInfo["ProjectFile"]; mProjectFile = mDebugInfo["ProjectFile"];

View file

@ -14,7 +14,7 @@
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' "> <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
<OutputPath>bin\Debug\</OutputPath> <OutputPath>bin\Debug\</OutputPath>
<BuildTarget>VMWare</BuildTarget> <BuildTarget>ISO</BuildTarget>
<Framework>MicrosoftNET</Framework> <Framework>MicrosoftNET</Framework>
<UseInternalAssembler>False</UseInternalAssembler> <UseInternalAssembler>False</UseInternalAssembler>
<DebugMode>Source</DebugMode> <DebugMode>Source</DebugMode>
@ -47,7 +47,7 @@
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\BreakpointsKernel\BreakpointsKernel.csproj"> <ProjectReference Include="..\Breakpoints\BreakpointsKernel.csproj">
<Name>BreakpointsKernel</Name> <Name>BreakpointsKernel</Name>
<Project>{91cbd640-c07d-4556-b4cb-6f8cd88c67c9}</Project> <Project>{91cbd640-c07d-4556-b4cb-6f8cd88c67c9}</Project>
<Private>True</Private> <Private>True</Private>

View file

@ -143,7 +143,7 @@ namespace Cosmos.VS.Package {
private void comboTarget_SelectedIndexChanged(object sender, EventArgs e) { private void comboTarget_SelectedIndexChanged(object sender, EventArgs e) {
var xEnumValue = (EnumValue)comboTarget.SelectedItem; var xEnumValue = (EnumValue)comboTarget.SelectedItem;
var xValue = (TargetHost)xEnumValue.Value; var xValue = (TargetHost)xEnumValue.Value;
if (xValue != TargetHost.VMWare) { if (xValue != TargetHost.VMWare && xValue != TargetHost.ISO) {
MessageBox.Show("This type is temporarily unsupported."); MessageBox.Show("This type is temporarily unsupported.");
} }
} }

View file

@ -18,6 +18,7 @@ namespace Cosmos.VS.Package.Templates.Wizards
public void ProjectItemFinishedGenerating(EnvDTE.ProjectItem projectItem) public void ProjectItemFinishedGenerating(EnvDTE.ProjectItem projectItem)
{ {
} }
public void RunFinished() public void RunFinished()

View file

@ -28,6 +28,12 @@ namespace Cosmos.VS.Package
{ {
LogUtility.LogString("Entering Cosmos.VS.Package.VsProjectConfig.DebugLaunch({0})", aLaunch); LogUtility.LogString("Entering Cosmos.VS.Package.VsProjectConfig.DebugLaunch({0})", aLaunch);
try try
{
if (String.Equals(this.GetConfigurationProperty("BuildTarget", true), "ISO", StringComparison.InvariantCultureIgnoreCase))
{
return VSConstants.S_OK;
}
else
{ {
// http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.shell.interop.vsdebugtargetinfo_members.aspx // http://msdn.microsoft.com/en-us/library/microsoft.visualstudio.shell.interop.vsdebugtargetinfo_members.aspx
var xInfo = new VsDebugTargetInfo(); var xInfo = new VsDebugTargetInfo();
@ -70,6 +76,7 @@ namespace Cosmos.VS.Package
LogUtility.LogString("Returning VSConstants.S_OK"); LogUtility.LogString("Returning VSConstants.S_OK");
return VSConstants.S_OK; return VSConstants.S_OK;
} }
}
catch (Exception e) catch (Exception e)
{ {
LogUtility.LogString("Error: " + e.ToString()); LogUtility.LogString("Error: " + e.ToString());