2002-09-16 Gaurav Vaish <gvaish_mono@lycos.com>
[mono.git] / mcs / class / Mono.CSharp.Debugger / IMonoSymbolWriter.cs
1 //
2 // System.Diagnostics.SymbolStore/IMonoSymbolWriter.cs
3 //
4 // Author:
5 //   Martin Baulig (martin@gnome.org)
6 //
7 // This interface is derived from System.Diagnostics.SymbolStore.ISymbolWriter.
8 //
9 // (C) 2002 Ximian, Inc.  http://www.ximian.com
10 //
11
12 using System;
13 using System.Reflection;
14 using System.Reflection.Emit;
15 using System.Diagnostics.SymbolStore;
16 using System.Collections;
17 using System.IO;
18         
19 namespace Mono.CSharp.Debugger
20 {
21         public interface IMonoSymbolWriter : ISymbolWriter
22         {
23                 void Initialize (string assembly_filename, string filename, string[] args);
24         }
25
26         internal interface ISourceFile
27         {
28                 string FileName {
29                         get;
30                 }
31
32                 ISourceMethod[] Methods {
33                         get;
34                 }
35
36                 void AddMethod (ISourceMethod method);
37         }
38
39         internal interface ISourceMethod
40         {
41                 ISourceLine[] Lines {
42                         get;
43                 }
44
45                 void AddLine (ISourceLine line);
46
47                 ISourceBlock[] Blocks {
48                         get;
49                 }
50
51                 ILocalVariable[] Locals {
52                         get;
53                 }
54
55                 void AddLocal (ILocalVariable local);
56
57
58                 ISourceLine Start {
59                         get;
60                 }
61
62                 ISourceLine End {
63                         get;
64                 }
65
66                 string FullName {
67                         get;
68                 }
69
70                 int Token {
71                         get;
72                 }
73
74                 Type ReturnType {
75                         get;
76                 }
77
78                 ParameterInfo[] Parameters {
79                         get;
80                 }
81
82                 MethodBase MethodBase {
83                         get;
84                 }
85
86                 ISourceFile SourceFile {
87                         get;
88                 }
89         }
90
91         internal interface ISourceBlock
92         {
93                 ISourceMethod SourceMethod {
94                         get;
95                 }
96
97                 ILocalVariable[] Locals {
98                         get;
99                 }
100
101                 void AddLocal (ILocalVariable local);
102
103                 ISourceBlock[] Blocks {
104                         get;
105                 }
106
107                 void AddBlock (ISourceBlock block);
108
109                 ISourceLine Start {
110                         get;
111                 }
112
113                 ISourceLine End {
114                         get;
115                 }
116
117                 int ID {
118                         get;
119                 }
120         }
121
122         internal enum SourceOffsetType
123         {
124                 OFFSET_NONE,
125                 OFFSET_IL,
126                 OFFSET_LOCAL,
127                 OFFSET_PARAMETER
128         }
129
130         internal interface ISourceLine
131         {
132                 SourceOffsetType OffsetType {
133                         get;
134                 }
135
136                 int Offset {
137                         get;
138                 }
139
140                 int Row {
141                         get;
142                 }
143
144                 int Column {
145                         get;
146                 }
147         }
148
149         internal interface ITypeHandle
150         {
151                 string Name {
152                         get;
153                 }
154
155                 Type Type {
156                         get;
157                 }
158
159                 int Token {
160                         get;
161                 }
162         }
163
164         internal interface IVariable
165         {
166                 string Name {
167                         get;
168                 }
169
170                 ISourceLine Line {
171                         get;
172                 }
173
174                 ITypeHandle TypeHandle {
175                         get;
176                 }
177
178                 ISourceMethod Method {
179                         get;
180                 }
181
182                 int Index {
183                         get;
184                 }
185         }
186
187         internal interface ILocalVariable : IVariable
188         { }
189
190         internal interface IMethodParameter : IVariable
191         { }
192 }