예제 #1
0
        internal void GenerateDebugInfo(ISymbolWriter symbolWriter)
        {
            if (sequencePointLists != null)
            {
                SequencePointList first = (SequencePointList)sequencePointLists [0];
                SequencePointList last  = (SequencePointList)sequencePointLists [sequencePointLists.Count - 1];
                symbolWriter.SetMethodSourceRange(first.Document, first.StartLine, first.StartColumn, last.Document, last.EndLine, last.EndColumn);

                foreach (SequencePointList list in sequencePointLists)
                {
                    symbolWriter.DefineSequencePoints(list.Document, list.GetOffsets(), list.GetLines(), list.GetColumns(), list.GetEndLines(), list.GetEndColumns());
                }

                if (locals != null)
                {
                    foreach (LocalBuilder local in locals)
                    {
                        if (local.Name != null && local.Name.Length > 0)
                        {
                            SignatureHelper sighelper = SignatureHelper.GetLocalVarSigHelper(module as ModuleBuilder);
                            sighelper.AddArgument(local.LocalType);
                            byte[] signature = sighelper.GetSignature();
                            symbolWriter.DefineLocalVariable(local.Name, FieldAttributes.Public, signature, SymAddressKind.ILOffset, local.position, 0, 0, local.StartOffset, local.EndOffset);
                        }
                    }
                }
                sequencePointLists = null;
            }
        }
예제 #2
0
		public virtual void MarkSequencePoint (ISymbolDocumentWriter document, int startLine,
						       int startColumn, int endLine, int endColumn)
		{
			if (currentSequence == null || currentSequence.Document != document) {
				if (sequencePointLists == null)
					sequencePointLists = new ArrayList ();
				currentSequence = new SequencePointList (document);
				sequencePointLists.Add (currentSequence);
			}
			
			currentSequence.AddSequencePoint (code_len, startLine, startColumn, endLine, endColumn);
		}
예제 #3
0
		public virtual void MarkSequencePoint (ISymbolDocumentWriter document, int startLine,
						       int startColumn, int endLine, int endColumn)
		{
			if (currentSequence == null || currentSequence.Document != document) {
				if (sequencePointLists == null)
					sequencePointLists = new ArrayList ();
				currentSequence = new SequencePointList (document);
				sequencePointLists.Add (currentSequence);
			}
			
			currentSequence.AddSequencePoint (code_len, startLine, startColumn, endLine, endColumn);
		}