diff --git a/source2/Build/Cosmos.Build.MSBuild/ReadNAsmMapToCosmosMap.cs b/source2/Build/Cosmos.Build.MSBuild/ReadNAsmMapToCosmosMap.cs index ec758db5e..b7104141d 100644 --- a/source2/Build/Cosmos.Build.MSBuild/ReadNAsmMapToCosmosMap.cs +++ b/source2/Build/Cosmos.Build.MSBuild/ReadNAsmMapToCosmosMap.cs @@ -26,7 +26,14 @@ namespace Cosmos.Build.MSBuild public override bool Execute() { - SourceInfo.WriteToFile(SourceInfo.ParseMapFile(InputBaseDir), OutputFile); + var xSourceInfos = SourceInfo.ParseMapFile(InputBaseDir); + if (xSourceInfos.Count == 0) + { + Log.LogError("No SourceInfos found!"); + return false; + } + SourceInfo.WriteToFile(xSourceInfos, OutputFile); + return true; } } diff --git a/source2/Debug/Cosmos.Debug.Common/CDebugger/SourceInfo.cs b/source2/Debug/Cosmos.Debug.Common/CDebugger/SourceInfo.cs index 3ddab5fa5..1e1a4a78d 100644 --- a/source2/Debug/Cosmos.Debug.Common/CDebugger/SourceInfo.cs +++ b/source2/Debug/Cosmos.Debug.Common/CDebugger/SourceInfo.cs @@ -81,15 +81,22 @@ namespace Cosmos.Debug.Common.CDebugger uint xIndex = 0; for (xIndex = 0; xIndex < xSourceStrings.Length; xIndex++) { - if (xSourceStrings[xIndex].StartsWith("Real Virtual Name")) + if (xSourceStrings[xIndex].StartsWith("Real ")) { + // further check it: + //Virtual Name")) + if (!xSourceStrings[xIndex].Substring(4).TrimStart().StartsWith("Virtual ") + ||!xSourceStrings[xIndex].EndsWith(" Name")) + { + continue; + } xIndex++; break; } } for (; xIndex < xSourceStrings.Length; xIndex++) { - var xLine = xSourceStrings[xIndex]; + var xLine = xSourceStrings[xIndex].Trim(); if (xLine.Length > 21) { uint xAddress = UInt32.Parse(xLine.Substring(0, 8), System.Globalization.NumberStyles.HexNumber); diff --git a/source2/Debug/Cosmos.Debug.VSDebugEngine/AD7.Impl/AD7Process.cs b/source2/Debug/Cosmos.Debug.VSDebugEngine/AD7.Impl/AD7Process.cs index db5c02aac..da8f465f6 100644 --- a/source2/Debug/Cosmos.Debug.VSDebugEngine/AD7.Impl/AD7Process.cs +++ b/source2/Debug/Cosmos.Debug.VSDebugEngine/AD7.Impl/AD7Process.cs @@ -288,4 +288,4 @@ namespace Cosmos.Debug.VSDebugEngine mDebugEngine.DebugConnector.SendCommand((byte)Command.Step); } } -} \ No newline at end of file +}