002-08-19 Tim Coleman <tim@timcoleman.com>
[mono.git] / mcs / class / Mono.CSharp.Debugger / IAssemblerWriter.cs
1 //
2 // Mono.CSharp.Debugger/IAssemblerWriter.cs
3 //
4 // Author:
5 //   Martin Baulig (martin@gnome.org)
6 //
7 // This is a platform and assembler independent assembler output interface.
8 //
9 // (C) 2002 Ximian, Inc.  http://www.ximian.com
10 //
11
12 using System;
13 using System.Collections;
14 using System.IO;
15         
16 namespace Mono.CSharp.Debugger
17 {
18         public interface IAssemblerWriter
19         {
20                 int GetNextLabelIndex ();
21
22                 void WriteLabel (int index);
23
24                 void WriteLabel (string label);
25
26                 int WriteLabel ();
27
28                 void WriteUInt8 (bool value);
29
30                 void WriteUInt8 (int value);
31
32                 void WriteInt8 (int value);
33
34                 void Write2Bytes (int a, int b);
35
36                 void WriteUInt16 (int value);
37
38                 void WriteInt16 (int value);
39
40                 void WriteUInt32 (int value);
41
42                 void WriteInt32 (int value);
43
44                 void WriteSLeb128 (int value);
45
46                 void WriteULeb128 (int value);
47
48                 void WriteAddress (int value);
49
50                 void WriteString (string value);
51
52                 void WriteSectionStart (String section);
53
54                 void WriteSectionEnd ();
55
56                 void WriteRelativeOffset (int start_label, int end_label);
57
58                 void WriteShortRelativeOffset (int start_label, int end_label);
59
60                 void WriteAbsoluteOffset (int index);
61
62                 void WriteAbsoluteOffset (string label);
63
64                 object StartSubsectionWithSize ();
65
66                 object StartSubsectionWithShortSize ();
67
68                 void EndSubsection (object end_index);
69         }
70 }