private ParserParagraph CreateChunkMultiple(string aName, DChunk aChunk) { ParserParagraph para = new ParserParagraph(aName); // ParserLine l1 = ParserLine.NewSymFormat("Owning Process %08x OS ASIDS %08x\r\n"); l1.SetTargetProperties(aChunk, "OwningProcessAddress", "OSAsids"); // ParserLine l2 = ParserLine.NewSymFormat("Size %x, MaxSize %x, Base %08x\r\n"); l2.SetTargetProperties(aChunk, "Size", "MaxSize", "Base"); // ParserLine l3 = ParserLine.NewSymFormat("Attrib %x, StartPos %x\r\n"); l3.SetTargetProperties(aChunk, "Attributes", "StartPos"); // ParserLine l4 = ParserLine.NewSymFormat("Type %d\r\n"); l4.SetTargetProperty(aChunk, "ChunkType"); // ParserLine l5 = ParserLine.NewSymFormat("PTE: %08x, PDE: %08x\r\n"); l5.SetTargetProperties(aChunk.Permissions, "Pte", "Pde"); // ParserLine l6 = ParserLine.NewSymFormat("PageTables=%08x, PageBitMap=%08x\r\n"); l6.SetTargetProperties(aChunk, "PageTables", "PageBitMap"); para.Add(l1, l2, l3, l4, l5, l6); return(para); }
private ParserParagraph CreateThreadCommon(string aName, NThread aThread) { ParserParagraph para = new ParserParagraph(aName); // ParserLine l1 = ParserLine.NewSymFormat("Next=%08x Prev=%08x Att=%02x\r\n"); l1.SetTargetProperties(new object[] { aThread.LinkedListInfo, aThread.LinkedListInfo, aThread }, "Next", "Previous", "Attributes"); // ParserLine l2 = ParserLine.NewSymFormat("HeldFM=%08x WaitFM=%08x AddrSp=%08x\r\n"); l2.SetTargetProperties(new object[] { aThread.MutexInfo, aThread.MutexInfo, aThread }, "HeldAddress", "WaitAddress", "AddressSpace"); // ParserLine l3 = ParserLine.NewSymFormat("Time=%d Timeslice=%d ReqCount=%d\r\n"); l3.SetTargetProperties(new object[] { aThread.TimeInfo, aThread.TimeInfo, aThread.CountInfo }, "Time", "Timeslice", "RequestSemaphoreCount"); // ParserLine l4 = ParserLine.NewSymFormat("LastStartTime=%08x TotalCpuTime=%lx Tag=%08x\r\n"); l4.SetTargetProperties(aThread.TimeInfo, "LastStartTime", "TotalCpuTime", "Tag"); // ParserLine l5 = ParserLine.NewSymFormat("ReturnValue=%d, UCT=%d\r\n"); l5.SetTargetProperties(aThread, "ReturnValue", "UserContextType"); // ParserLine l6 = ParserLine.NewSymFormat("SuspendCount=%d CsCount=%d CsFunction=%08x\r\n"); l6.SetTargetProperties(aThread.CountInfo, "SuspendCount", "CsCount", "CsFunctionRaw"); // ParserLine l7 = ParserLine.NewSymFormat("SavedSP=%08x ExtraContext=%08x ExtraContextSize=%08x\r\n"); l7.SetTargetProperties(new object[] { aThread, aThread.ExtraContextInfo, aThread.ExtraContextInfo }, "SavedSP", "ExtraContext", "ExtraContextSizeRaw"); // para.Add(l1, l2, l3, l4, l5, l6, l7); return(para); }
public override ParserField Process(Capture aCapture, int aStartAt, ParserLine aLine) { ParserField ret = null; // RegExTranslatorExtractionInfo m = new RegExTranslatorExtractionInfo(aLine.OriginalValue, aStartAt); // if (m.Success && m.ValueTypeChar == 'X') { // Build the regular expression StringBuilder regex = new StringBuilder("[A-Fa-f0-9]"); if (m.Width != RegExTranslatorExtractionInfo.KNoWidthSpecified) { // Add specific length suffix regex.Append("{"); regex.Append(m.Width.ToString()); regex.Append("}"); } else { // Add "one or more" suffix regex.Append("+"); } ret = CreateField(regex.ToString(), m.Name, m.ValueType, m.CapturePos, m.CaptureLength, true); ret.FormatSpecifier.NumberBase = m.NumberBase; } // return(ret); }
private ParserParagraph PrepareUserStack(ThreadStackInfo aStackInfo) { ParserParagraph para = new ParserParagraph(KParagraphUser); // ParserLine l0 = ParserLine.New("No user-mode stack"); l0.ElementComplete += new ParserElementBase.ElementCompleteHandler(NoUserStackCallBack); // ParserLine l1 = ParserLine.NewSymFormat("User stack base at %08x, size == %x\r\n"); l1.SetTargetProperties(aStackInfo, "BaseAddress", "Size"); // ParserLine l2 = ParserLine.NewSymFormat("Stack pointer == %08x\r\n"); l2.SetTargetProperties(aStackInfo, "StackPointer"); // // Not needed - ParserLine l3 = ParserLine.NewSymFormat( "Stack mapped at %08x\r\n" ); //l3.SetTargetProperties( aStackInfo.Data, "MappedAddress" ); // Collect the raw stack bytes ParserLine l4 = ParserLine.NewSymFormat("%08x: %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x"); l4.IsNeverEnding = true; l4.DisableWhenComplete = false; l4.SetTargetMethod(aStackInfo.Data, "Add"); // Record the starting address of the stack data l4[0].SetTargetMethod(this, "SetFirstStackBytesStartingAddress"); l4[0].Tag = aStackInfo; // para.Add(l0, l1, l2, l4); return(para); }
private ParserParagraph CreateMonitorProcessCommon(string aName, DProcess aProcess) { ParserParagraph para = new ParserParagraph(aName); // ParserLine l1 = ParserLine.NewSymFormat("ExitInfo %d,%d,%lS\r\n"); l1.SetTargetProperties(aProcess.ExitInfo, "Type", "Reason", "Category"); // ParserLine l2 = ParserLine.NewSymFormat("Flags %08x, Handles %08x, Attributes %08x\r\n"); l2.SetTargetProperties(aProcess, "Flags", "Handles", "Attributes"); // ParserLine l3 = ParserLine.NewSymFormat("DataBssChunk %08x, CodeSeg %08x\r\n"); l3.SetTargetProperties(aProcess, "DataBssStackChunkAddress", "CodeSegAddress"); // ParserLine l4 = ParserLine.NewSymFormat("DllLock %08x, Process Lock %08x SID %08x\r\n"); l4.SetTargetProperties(new object[] { aProcess.LockInfo, aProcess.LockInfo, aProcess }, "DllMutexAddress", "ProcessMutexAddress", "SID"); // ParserLine l5 = ParserLine.NewSymFormat("TempCodeSeg %08x CodeSeg %08x Capability %08x %08x\r\n"); l5.SetTargetProperties(new object[] { aProcess, aProcess, aProcess.Capabilities, aProcess.Capabilities }, "TempCodeSegAddress", "CodeSegAddress", "HighDWord", "LowDWord"); // ParserLine l6 = ParserLine.NewSymFormat("Id=%d"); l6.SetTargetProperties(aProcess, "Id"); para.Add(l1, l2, l3, l4, l5, l6); return(para); }
private ParserParagraph CreateMonitorProcessMemModelMultiple(string aName, DProcess aProcess, ParserElementBase.ElementCompleteHandler aLastFieldHandler) { ParserParagraph para = new ParserParagraph(aName); para.Tag = aProcess; if (aLastFieldHandler != null) { para.ElementComplete += new ParserElementBase.ElementCompleteHandler(aLastFieldHandler); } // Misc ParserLine l0 = ParserLine.NewSymFormat("OS ASID=%d, LPD=%08x, GPD=%08x\r\n"); l0.SetTargetProperties(aProcess, "OSASID", "LPD", "GPD"); // Loop body - construct this first as we use it for the header line ParserLine l2 = ParserLine.NewSymFormat("%d: Chunk %08x, access count %d\r\n"); l2[0].SetTargetObject(); l2[1].SetTargetMethod(this, "AddChunkToProcess"); l2[2].SetTargetMethod(this, "SetChunkAccessCount"); // Loop header ParserLine l1 = ParserLine.NewSymFormat("ChunkCount=%d ChunkAlloc=%d\r\n"); l1[0].SetTargetMethod(l2, "SetRepetitions"); para.Add(l0, l1, l2); return(para); }
public override void Finalise() { System.Diagnostics.Debug.Assert(ParserEngine.Count == 1); // paragraphs ParserParagraph para = ParserEngine[0]; System.Diagnostics.Debug.Assert(para.Count == 8); // lines // Go through each line and pull out the debug mask. for (int i = 0; i < 4; i++) { int baseIndex = (i * 2); // Get lines and check that each has one field ParserLine line1 = para[baseIndex]; System.Diagnostics.Debug.Assert(line1.Count == 1); System.Diagnostics.Debug.Assert(line1[0].IsUint); ParserLine line2 = para[baseIndex + 1]; System.Diagnostics.Debug.Assert(line2.Count == 1); System.Diagnostics.Debug.Assert(line2[0].IsUint); // uint val1 = line1[0].AsUint; uint val2 = line2[0].AsUint; ulong combined = val1 + (val2 << 32); // CrashDebugger.InfoDebugMask.SetValueByWordIndex(combined, baseIndex); } }
public static void RegisterCommands(ParserEngine aEngine) { CreateDictionary(); // foreach (KeyValuePair <TState, TStateMapplet> keyVP in iDictionary) { string[] commandIds = keyVP.Value.CommandIdentifiers; foreach (string commandId in commandIds) { // Create paragraph and associate the state type with the tag so that // we know what type of object to create later on when the line fires. ParserParagraph command = new ParserParagraph(commandId); command.Tag = keyVP.Key; // Create line to match ParserLine line = ParserLine.New(commandId); // Make sure that the paragraph and line don't disable themselves whenever // they see a matching line. Some of these objects are needed more than once! command.DisableWhenComplete = false; line.DisableWhenComplete = false; // command.Add(line); aEngine.Add(command); } } }
void LineComplete(ParserElementBase aElement) { ParserLine line = (ParserLine)aElement; TUserContextType tableType = (TUserContextType)line.Tag; UserContextTable table = CrashDebugger.UserContextTableManager[tableType]; // Each line should have a known number of entries stored within it's field collection. int expectedCount = UserContextTable.EntryCount * 2; // 2 fields per table entry int actualCount = line.Count; if (expectedCount == actualCount) { for (int i = 0; i < expectedCount; i += 2) { ParserField fieldType = line[i + 0]; ParserField fieldValue = line[i + 1]; // if (fieldType.IsUint && fieldValue.IsUint) { UserContextTable.TArmRegisterIndex reg = (UserContextTable.TArmRegisterIndex)(i / 2); UserContextTableEntry entry = table[reg]; // UserContextTableEntry.TType type = (UserContextTableEntry.TType)fieldType.AsUint; byte value = (byte)fieldValue.AsUint; // entry.Type = type; entry.Offset = value; } } } else { throw new Exception("User Context Table Corruption"); } }
private ParserParagraph PrepareSupervisorStack(ThreadStackInfo aStackInfo) { ParserParagraph para = new ParserParagraph("STACK_SUPERVISOR"); // ParserLine l1 = ParserLine.NewSymFormat("Supervisor stack base at %08x, size == %x\r\n"); l1.ElementComplete += new ParserElementBase.ElementCompleteHandler(DisableUserStackParagraph); l1.SetTargetProperties(aStackInfo, "BaseAddress", "Size"); // ParserLine l2 = ParserLine.NewSymFormat("Stack pointer == %08x\r\n"); l2.SetTargetProperties(aStackInfo, "StackPointer"); // Collect the raw stack bytes ParserLine l3 = ParserLine.NewSymFormat("%08x: %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x"); l3.IsNeverEnding = true; l3.DisableWhenComplete = false; l3.SetTargetMethod(aStackInfo.Data, "Add"); // Record the starting address of the stack data l3[0].SetTargetMethod(this, "SetFirstStackBytesStartingAddress"); l3[0].Tag = aStackInfo; // para.Add(l1, l2, l3); return(para); }
public void SetCustomCodeSegment(string aPrefix) { // Find any existing custom entry and remove it int paraCount = iPrefixEngine_CodeSegment.Count; System.Diagnostics.Debug.Assert(paraCount >= 1); if (paraCount > 1) { iPrefixEngine_CodeSegment.RemoveRange(1); } string prefixText = aPrefix.Trim(); if (prefixText != string.Empty) { ParserParagraph para = new ParserParagraph("Dynamic_CodeSegment"); // prefixText += "%08x-%08x %S"; // ParserLine l1 = ParserLine.NewSymFormat(prefixText); l1.SetTargetMethod(this, "TryToParseCodeSegment"); l1.DisableWhenComplete = false; para.Add(l1); para.DisableWhenComplete = false; iPrefixEngine_CodeSegment.Add(para); } }
public void SetThreadMStateWaitObject(ParserParagraph aParagraph, ParserLine aLine, ParserFieldName aParameterName, uint aWaitObjectAddress) { System.Diagnostics.Debug.Assert(aParagraph.Tag is DThread); DThread thread = (DThread)aParagraph.Tag; thread.WaitObj = aWaitObjectAddress; }
private ParserParagraph CreateMessageQueueCommon(string aName, DMsgQueue aQueue) { ParserParagraph para = new ParserParagraph(aName); // ParserLine l1 = ParserLine.NewSymFormat("StartOfPool %08x, EndOfPool %08x\r\n"); l1.SetTargetProperties(aQueue.PoolInfo, "Start", "End"); // ParserLine l2 = ParserLine.NewSymFormat("FirstFullSlot %08x, FirstFreeSlot %08x\r\n"); l2.SetTargetProperties(aQueue.SlotInfo, "FirstFull", "FirstFree"); // ParserLine l3 = ParserLine.NewSymFormat("MaxMsgLength %d\r\n"); l3.SetTargetProperties(aQueue, "MaxMessageLength"); // ParserLine l4 = ParserLine.NewSymFormat("MessageQueue state %S"); l4.Tag = aQueue; l4.SetTargetMethod(this, "SetMessageQueueState"); // ParserLine l5 = ParserLine.NewSymFormat("ThreadWaitingForData %08x, DataAvailStatPtr %08x\r\n"); l5.SetTargetProperties(new object[] { aQueue.WaitData, aQueue.WaitData.RequestStatus }, "WaitingThreadAddress", "Address"); // ParserLine l6 = ParserLine.NewSymFormat("ThreadWaitingForSpace %08x, SpaceAvailStatPtr %08x\r\n"); l6.SetTargetProperties(new object[] { aQueue.WaitSpace, aQueue.WaitSpace.RequestStatus }, "WaitingThreadAddress", "Address"); para.Add(l1, l2, l3, l4, l5, l6); return(para); }
private void CreateRegisterParagraphs(ParserEngine aEngine, NThread aThread, ParserElementBase.ElementCompleteHandler aLastFieldHandler) { { ParserParagraph para = new ParserParagraph("NTHREAD_REGS1"); para.SetTargetMethod(aThread.Registers, "Add"); ParserLine l1 = ParserLine.NewSymFormat("FPEXC %08x\r\n"); ParserLine l2 = ParserLine.NewSymFormat("CAR %08x\r\n"); ParserLine l3 = ParserLine.NewSymFormat("DACR %08x\r\n"); para.Add(l1, l2, l3); aEngine.Add(para); } { ParserParagraph para = new ParserParagraph("NTHREAD_REGS2"); para.SetTargetMethod(aThread.Registers, "Add"); ParserLine l1 = ParserLine.NewSymFormat("R13_USR %08x R14_USR %08x SPSR_SVC %08x\r\n"); ParserLine l2 = ParserLine.NewSymFormat(" R4 %08x R5 %08x R6 %08x R7 %08x\r\n"); ParserLine l3 = ParserLine.NewSymFormat(" R8 %08x R9 %08x R10 %08x R11 %08x\r\n"); ParserLine l4 = ParserLine.NewSymFormat(" PC %08x\r\n"); // if (aLastFieldHandler != null) { l4[0].ElementComplete += new ParserElementBase.ElementCompleteHandler(aLastFieldHandler); } // para.Add(l1, l2, l3, l4); aEngine.Add(para); } }
private void CreateThreadMState(ParserParagraph aParagraph, DThread.TThreadState aState, string aMStateName, bool aCapturesWaitObject) { StringBuilder format = new StringBuilder("Thread MState"); format.Append(" " + aMStateName); // if (aCapturesWaitObject) { format.Append(" %8x"); } // string finalFormat = format.ToString(); ParserLine l1 = null; // if (aCapturesWaitObject) { l1 = ParserLine.NewSymFormat(finalFormat); } else { l1 = ParserLine.New(finalFormat); } l1.Tag = aState; l1.ElementComplete += new ParserElementBase.ElementCompleteHandler(ThreadMState_ElementComplete); // if (aCapturesWaitObject) { l1[0].SetTargetMethod(this, "SetThreadMStateWaitObject"); } // aParagraph.Add(l1); }
public void SetCustomPointer(string aPrefix) { // Find any existing custom entry and remove it int paraCount = iPrefixEngine_Pointer.Count; System.Diagnostics.Debug.Assert(paraCount >= 1); if (paraCount > 1) { iPrefixEngine_Pointer.RemoveRange(1); } string prefixText = aPrefix.Trim(); if (prefixText != string.Empty) { ParserParagraph para = new ParserParagraph("Dynamic_Pointer"); // prefixText += "%08x"; // ParserLine l1 = ParserLine.NewSymFormat(prefixText); l1.SetTargetProperty(iEngine.AddressInfo, "Pointer"); para.Add(l1); iPrefixEngine_Pointer.Add(para); } }
private void CreateThreadNState(ParserParagraph aParagraph, NThread aThread, string aNStateName, bool aCapturesWaitObject) { StringBuilder format = new StringBuilder("NThread @ %8x Pri %d NState " + aNStateName); // if (aCapturesWaitObject) { format.Append(" %8x"); } format.Append("\r\n"); // // string finalFormat = format.ToString(); NThread.TNThreadState state = NThread.NStateFromString(aNStateName); ParserLine l1 = ParserLine.NewSymFormat(finalFormat); l1.Tag = state; // l1[0].SetTargetProperty(aThread, "Address"); l1[1].SetTargetProperty(aThread, "Priority"); // if (aCapturesWaitObject) { l1[2].SetTargetMethod(this, "SetThreadNStateWaitObject"); } // l1.ElementComplete += new ParserElementBase.ElementCompleteHandler(NThreadState_ElementComplete); aParagraph.Add(l1); }
public void SetMessageQueueState(ParserLine aLine, ParserFieldName aFieldName, string aState) { System.Diagnostics.Debug.Assert(aLine.Tag is DMsgQueue); DMsgQueue queue = (DMsgQueue)aLine.Tag; DMsgQueue.TQueueState state = DMsgQueue.StateByString(aState); queue.State = state; }
private object[] BuildCustomFunctionArguments(TValueStoreMethodArguments[] aArgumentSpecification, ParserFieldFormatSpecifier aFieldFormatSpecifier, ParserFieldFormatValue aFieldFormatValue) { List <object> args = new List <object>(); // foreach (TValueStoreMethodArguments argType in aArgumentSpecification) { if (argType == TValueStoreMethodArguments.EValueStoreMethodArgumentNameAsString) { args.Add(aFieldFormatSpecifier.Name.ToString()); } else if (argType == TValueStoreMethodArguments.EValueStoreMethodArgumentNameAsObject) { args.Add(aFieldFormatSpecifier.Name); } else if (argType == TValueStoreMethodArguments.EValueStoreMethodArgumentValue) { args.Add(aFieldFormatValue.Value); } else if (argType == TValueStoreMethodArguments.EValueStoreMethodArgumentParagraph) { ParserParagraph para = null; // if (aFieldFormatSpecifier.Field.Parent != null && aFieldFormatSpecifier.Field.Parent is ParserLine) { ParserLine line = (ParserLine)aFieldFormatSpecifier.Field.Parent; if (line.Parent != null && line.Parent is ParserParagraph) { para = (ParserParagraph)line.Parent; } } // args.Add(para); } else if (argType == TValueStoreMethodArguments.EValueStoreMethodArgumentLine) { ParserLine line = null; // if (aFieldFormatSpecifier.Field.Parent != null && aFieldFormatSpecifier.Field.Parent is ParserLine) { line = (ParserLine)aFieldFormatSpecifier.Field.Parent; } // args.Add(line); } else if (argType == TValueStoreMethodArguments.EValueStoreMethodArgumentField) { args.Add(aFieldFormatSpecifier.Field); } else { System.Diagnostics.Debug.Assert(false, "Argument specification contains unresolved runtime reference"); } } // return(args.ToArray()); }
private void TryToParseCodeSegment(ParserLine aLine) { string line = aLine.GetCurrentLine(); CodeSegDefinition codeSegDef = CodeSegDefinitionParser.ParseDefinition(line); if (codeSegDef != null) { iEngine.CodeSegments.Add(codeSegDef); } }
void ThreadMState_ElementComplete(ParserElementBase aElement) { ParserLine line = (ParserLine)aElement; ParserParagraph paragraph = line.Paragraph; System.Diagnostics.Debug.Assert(paragraph.Tag is DThread); DThread thread = (DThread)paragraph.Tag; DThread.TThreadState state = (DThread.TThreadState)line.Tag; thread.MState = state; }
public override void Prepare() { // First, we need to know which thread we're dealing with // so that means we must look for the thread info ParserParagraph para = new ParserParagraph("STACK_THREAD_INFO"); // ParserLine l1 = ParserLine.NewSymFormat("STACK DATA for thread at %8x"); l1.SetTargetMethod(this, "SetThreadAddress"); para.Add(l1); ParserEngine.Add(para); }
void NoUserStackCallBack(ParserElementBase aElement) { // Called back when a thread has no user stack - in which case, dump the // user-stack items as they will prevent us gathering the supervisor info. ParserLine line = (ParserLine)aElement; ParserParagraph para = line.Paragraph; // foreach (ParserLine l in para) { l.IsDisabled = true; } }
private void PrepareEntryParser() { ParserParagraph para = new ParserParagraph("CODE SEGS"); // ParserLine l1 = ParserLine.NewSymFormat("\r\nCodeSeg at %08x:\r\n"); ParserLine l2 = ParserLine.NewSymFormat(" FileName: %S\r\n"); ParserLine l3 = ParserLine.NewSymFormat(" RunAddress: %08x\r\n"); para.ElementComplete += new SymbianParserLib.BaseStructures.ParserElementBase.ElementCompleteHandler(ParagraphComplete); // para.Add(l1, l2, l3); ParserEngine.Add(para); }
void NThreadState_ElementComplete(ParserElementBase aElement) { ParserLine line = (ParserLine)aElement; System.Diagnostics.Debug.Assert(line.Tag is NThread.TNThreadState); NThread.TNThreadState state = (NThread.TNThreadState)line.Tag; ParserParagraph paragraph = line.Paragraph; System.Diagnostics.Debug.Assert(paragraph.Tag is NThread); NThread thread = (NThread)paragraph.Tag; thread.NState = state; }
public override ParserField Process(Capture aCapture, int aStartAt, ParserLine aLine) { ParserField ret = null; // RegExTranslatorExtractionInfo m = new RegExTranslatorExtractionInfo(aLine.OriginalValue, aStartAt); // if (m.Success && m.ValueType == TParserValueType.EValueTypeString) { ret = CreateField(".+", m.Name, m.ValueType, m.CapturePos, m.CaptureLength); } // return(ret); }
private void PreparePrefixes_CodeSegment() { ParserParagraph para = new ParserParagraph("Fixed_CodeSegment"); // ParserLine l1 = ParserLine.NewSymFormat("%08x-%08x %S"); l1.SetTargetMethod(this, "TryToParseCodeSegment"); l1.DisableWhenComplete = false; // para.Add(l1); para.DisableWhenComplete = false; // iPrefixEngine_CodeSegment.Add(para); }
private void PrepareMandatoryParagraph() { ParserParagraph para = new ParserParagraph("FaultInfo"); // ParserLine l1 = ParserLine.NewSymFormat("Fault Category: %S Fault Reason: %08x\r\n"); l1.SetTargetProperties(CrashDebugger.InfoFault, "Category", "Reason"); // ParserLine l2 = ParserLine.NewSymFormat("ExcId %08x CodeAddr %08x DataAddr %08x Extra %08x\r\n"); l2.SetTargetProperties(CrashDebugger.InfoFault, "ExceptionId", "CodeAddress", "DataAddress", "ExtraInfo"); // para.Add(l1, l2); ParserEngine.Add(para); }
void CodeSegmentLineComplete(ParserElementBase aElement) { System.Diagnostics.Debug.Assert(iCurrentThread != null); ParserLine line = (ParserLine)aElement; // int index = line[0].AsInt; int count = line[1].AsInt; uint codeSegAddress = line[2].AsUint; uint startAddress = line[3].AsUint; uint endAddress = line[4].AsUint; string fileName = line[5].AsString; // DProcess process = iCurrentThread.OwningProcess; if (process != null) { ProcessCodeSegCollection codeSegs = process.CodeSegments; ProcessCodeSeg codeSeg = codeSegs[codeSegAddress]; // if (codeSeg == null) { // The code seg is not directly part of the process handle list // but it is some how mapped into the process? // // Try looking up the underlying code seg entry details from // the crash debugger data itself. It should be part of the code // seg listing so this should always work. codeSeg = new ProcessCodeSeg(CrashDebugger, codeSegAddress, 0); process.CodeSegments.Add(codeSeg); } // codeSeg.ProcessLocalRunAddress = startAddress; codeSeg.Size = (endAddress - startAddress); } // int remaining = count - index; if (remaining == 0) { // Queue up stack data... iHelperStack.CreateStackParagraphs(ParserEngine, iCurrentThread); } else { // So that we capture the next line aElement.SetRepetitions(1); } }
private ParserParagraph CreateParagraph(string aName, RegisterCollection.TType aType) { RegisterCollection registers = CrashDebugger.InfoCpu[aType]; // ParserParagraph para = new ParserParagraph(aName); para.Tag = aType; para.SetTargetMethod(this, "AddRegister"); // if (aName.Length > 0) { ParserLine header = ParserLine.New(aName + "\r\n"); header.SetTargetMethod(this, "SwitchBank"); } return(para); }