Пример #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
		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;
			}
		}