1 // Licensed to the .NET Foundation under one or more agreements. 2 // The .NET Foundation licenses this file to you under the MIT license. 3 // See the LICENSE file in the project root for more information. 4 5 using System.Collections.Generic; 6 7 using Internal.JitInterface; 8 using Internal.TypeSystem; 9 10 namespace ILCompiler.DependencyAnalysis 11 { 12 public struct DebugLocInfo 13 { 14 public readonly int NativeOffset; 15 public readonly string FileName; 16 public readonly int LineNumber; 17 public readonly int ColNumber; 18 DebugLocInfoILCompiler.DependencyAnalysis.DebugLocInfo19 public DebugLocInfo(int nativeOffset, string fileName, int lineNumber, int colNumber = 0) 20 { 21 NativeOffset = nativeOffset; 22 FileName = fileName; 23 LineNumber = lineNumber; 24 ColNumber = colNumber; 25 } 26 } 27 28 public interface INodeWithDebugInfo 29 { 30 DebugLocInfo[] DebugLocInfos 31 { 32 get; 33 } 34 35 DebugVarInfo[] DebugVarInfos 36 { 37 get; 38 } 39 } 40 41 public struct DebugVarInfo 42 { 43 public readonly string Name; 44 public readonly bool IsParam; 45 public readonly TypeDesc Type; 46 public List<NativeVarInfo> Ranges; 47 DebugVarInfoILCompiler.DependencyAnalysis.DebugVarInfo48 public DebugVarInfo(string name, bool isParam, TypeDesc type) 49 { 50 this.Name = name; 51 this.IsParam = isParam; 52 this.Type = type; 53 this.Ranges = new List<NativeVarInfo>(); 54 } 55 } 56 57 public static class WellKnownLineNumber 58 { 59 /// <summary> 60 /// Informs the debugger that it should step through the annotated sequence point. 61 /// </summary> 62 public const int DebuggerStepThrough = 0xF00F00; 63 64 /// <summary> 65 /// Informs the debugger that it should step into the annotated sequence point. 66 /// </summary> 67 public const int DebuggerStepIn = 0xFEEFEE; 68 } 69 } 70