using System; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using Microsoft.Build.Framework; using Cosmos.Debug.Symbols; namespace Cosmos.Build.MSBuild { public class ReadNAsmMapToDebugInfo : BaseToolTask { [Required] public string InputBaseDir { get; set; } [Required] public string DebugInfoFile { get; set; } public override bool Execute() { var xSW = new Stopwatch(); xSW.Start(); try { var xSourceInfos = ParseMapFile(InputBaseDir); if (xSourceInfos.Count == 0) { Log.LogError("No SourceInfos found!"); return false; } using (var xDebugInfo = new DebugInfo(DebugInfoFile)) { xDebugInfo.AddLabels(xSourceInfos); xDebugInfo.CreateIndexes(); } return true; } catch (Exception ex) { Log.LogErrorFromException(ex, true, true, null); return false; } finally { xSW.Stop(); Log.LogMessage(MessageImportance.High, "ReadNAsmMapToDebugInfo took {0}", xSW.Elapsed); } } private static List