protected override void HandleFilteredLine(string aLine) { Match m = KMapParserRegex.Match(aLine); if (m.Success) { GroupCollection groups = m.Groups; string type = groups["Type"].Value; string host = groups["Host"].Value; string device = groups["Device"].Value; // Fix up names try { if (type != "ROFS_HEADER") { host = CombineWithHostDrive(host); device = CombineWithDeviceDrive(device); if (EntryRead != null) { EntryRead(this, host, device); } } } catch (Exception) { base.Trace("WARNING: exception when trying to parse OBY line: [{0}], file: [{1}]", aLine, base.FileName); } } }
protected override void Scan() { base.DriveLetter = Path.GetPathRoot(iFile.FullName); if (iFile.Exists) { using (StreamReader reader = new StreamReader(iFile.FullName)) { string line = reader.ReadLine(); // while (line != null) { Match m = KMapParserRegex.Match(line); if (m.Success) { string nameHost = base.CombineWithDriveLetter(m.Groups["Host]"].Value); string nameDevice = Path.Combine(KRomDriveFileLetter, m.Groups["Device"].Value); // CodeSegResolverEntry entry = new CodeSegResolverEntry(nameHost, nameDevice); // base.Add(entry); } // line = reader.ReadLine(); } } } }
public override bool Parse(string aLine) { Match m = KMapParserRegex.Match(aLine); if (m.Success) { GroupCollection groups = m.Groups; // uint globalBaseAddress = MapFile.GlobalBaseAddress; // Object = groups["Binary"].Value; Type = TypeByString(groups["Type"].Value); Symbol = groups["Function"].Value; OffsetAddress = long.Parse(groups["Address"].Value, System.Globalization.NumberStyles.HexNumber) - globalBaseAddress; Size = long.Parse(groups["Size"].Value); } // return(m.Success); }
public Symbol Parse(string aLine) { Symbol ret = null; // Match m = KMapParserRegex.Match(aLine); if (m.Success) { GroupCollection groups = m.Groups; // uint globalBaseAddress = iReader.GlobalBaseAddress; string typeString = groups["Type"].Value; // string objectName = groups["Binary"].Value; uint size = uint.Parse(groups["Size"].Value); string symbol = groups["Function"].Value; if (symbol.Contains(KExported)) { symbol = symbol.Substring(0, symbol.LastIndexOf(KExported)); } uint offsetAddress = uint.Parse(groups["Address"].Value, System.Globalization.NumberStyles.HexNumber) - globalBaseAddress; TSymbolType type = TypeByString(typeString); // ret = Symbol.New(iCollection); ret.OffsetAddress = offsetAddress; ret.Size = size; ret.Object = objectName; ret.Name = symbol; ret.Type = type; TSymbolType tt = ret.Type; // If the MAP file indicated thumb code then ensure our symbol library agrees. if (typeString == "Thumb Code") { System.Diagnostics.Debug.Assert(ret.InstructionSet == SymbianStructuresLib.Arm.TArmInstructionSet.ETHUMB); } } // return(ret); }
public Symbol Parse(string aLine) { Symbol ret = null; // Match m = KMapParserRegex.Match(aLine); if (m.Success) { GroupCollection groups = m.Groups; // uint globalBaseAddress = iReader.GlobalBaseAddress; string symbol = groups["Function"].Value; uint offsetAddress = uint.Parse(groups["Address"].Value, System.Globalization.NumberStyles.HexNumber) - globalBaseAddress; // if (symbol != null) { symbol = symbol.Trim(); // if (!string.IsNullOrEmpty(symbol)) { if (symbol.StartsWith("PROVIDE")) { } else { ret = Symbol.New(iCollection); ret.OffsetAddress = offsetAddress; ret.Size = 0; ret.Object = string.Empty; ret.Name = symbol; } } } } // return(ret); }