Merge pull request #5002 from BrzVlad/feature-sgen-modes
[mono.git] / mono / dis / monodis.1
1 .\" 
2 .\" monodis manual page.
3 .\" (C) Ximian, Inc. 
4 .\" Author:
5 .\"   Miguel de Icaza (miguel@gnu.org)
6 .\"
7 .TH Mono "Mono 1.1.x"
8 .SH NAME
9 monodis \- CIL image content dumper and disassembler.
10 .SH SYNOPSIS
11 .PP
12 .B monodis
13 [\-h] [\-\-help] 
14 [\-\-output=FILENAME]
15 [\-\-mscorlib]
16 [\-\-assembly]
17 [\-\-assemblyref]
18 [\-\-classlayout]
19 [\-\-constant]
20 [\-\-customattr]
21 [\-\-declsec]
22 [\-\-event]
23 [\-\-exported]
24 [\-\-fields]
25 [\-\-file]
26 [\-\-forward-decls]
27 [\-\-genericpar]
28 [\-\-implmap]
29 [\-\-interface]
30 [\-\-manifest]
31 [\-\-marshal]
32 [\-\-memberref]
33 [\-\-method]
34 [\-\-methodimpl]
35 [\-\-methodsem]
36 [\-\-methodspec]
37 [\-\-module]
38 [\-\-moduleref]
39 [\-\-mresources]
40 [\-\-presources]
41 [\-\-nested]
42 [\-\-param]
43 [\-\-parconst]
44 [\-\-property]
45 [\-\-propertymap]
46 [\-\-standalonesig]
47 [\-\-typedef]
48 [\-\-typeref]
49 [\-\-typespec]
50 [\-\-blob]
51 [\-\-strings]
52 [\-\-userstrings]
53 [FILES...]
54 .SH DESCRIPTION
55 The \fImonodis\fP program is used to dump the contents an ECMA/ISO CIL
56 image (contained in .EXE files that contain extended PE/COFF CIL
57 code).
58 .PP
59 To roundtrip assemblies using ilasm, it is best to use the --output
60 argument, as that will make monodis save the embedded resources in
61 files that can later be properly embedded back by ilasm. 
62 .PP
63 Additionally, the tool can be used to dump the contents of the various
64 ECMA CIL metadata tables.
65 .SH OPTIONS
66 The following Generic options are supported:
67 .TP
68 .I "--help", "-h"
69 Displays usage instructions.
70 .TP
71 .I "--output=FILENAME"
72 Write output into \fIFILENAME\fP and dump any embedded managed resources.
73 .TP
74 .I "--mscorlib"
75 For non-corlib assemblies, use "mscorlib" as the assembly name. This
76 is useful for round-tripping the IL with ilasm.
77 .TP
78 .I "--show-method-tokens"
79 Display tokens for disassembled methods.
80 .TP
81 .I "--show-tokens"
82 Display tokens for strings, types, methods, fields, etc.
83 .SH OPTIONS TO DISPLAY METADATA TABLES
84 The following options are used to display metadata tables instead of
85 disassembling the CIL image.
86 .TP
87 .I "--assembly"
88 Dumps the contents of the Assembly table.
89 .TP
90 .I "--assemblyref"
91 Dumps the contents of the AssemblyRef table.
92 .TP
93 .I "--classlayout"
94 Dumps the contents of the ClassLayout table.
95 .TP
96 .I "--constant"
97 Dumps the contents of the Constant table.
98 .TP
99 .I "--customattr"
100 Dumps the contents of the CustomAttribute table.
101 .TP
102 .I "--declsec"
103 Dumps the contents of the DeclSec table.
104 .TP
105 .I "--event"
106 Dumps the contents of the Event table.
107 .TP
108 .I "--exported"
109 Dumps the contents of the ExportedType table.
110 .TP
111 .I "--fields"
112 Dumps the contents of the Field table.
113 .TP
114 .I "--file"
115 Dumps the contents of the File table.
116 .TP
117 .I "--forward-decls"
118 Dumps forward declarations for classes.
119 .TP
120 .I "--genericpar"
121 Dumps the contents of the GenericParam table.
122 .TP
123 .I "--implmap"
124 Dumps the contents of the ImplMap table.
125 .TP
126 .I "--interface"
127 Dumps the contents of the InterfaceImpl table.
128 .TP
129 .I "--manifest"
130 Dumps the contents of the ManifestResource table.
131 .TP
132 .I "--marshal"
133 Dumps the contents of the FieldMarshal table.
134 .TP
135 .I "--memberref"
136 Dumps the contents of the MemberRef table.
137 .TP
138 .I "--method"
139 Dumps the contents of the MethodDef table.
140 .TP
141 .I "--methodimpl"
142 Dumps the contents of the MethodImpl table.
143 .TP
144 .I "--methodspec"
145 Dumps the contents of the MethodSpec table.
146 .TP
147 .I "--methodsem"
148 Dumps the contents of the MethodSemantics table.
149 .TP
150 .I "--module"
151 Dumps the contents of the Module table.
152 .TP
153 .I "--moduleref"
154 Dumps the contents of the ModuleRef table.
155 .TP
156 .I "--mresources"
157 Saves all the managed resources embedded in the assembly into the
158 current directory.   To get a list of the embedded resources use the
159 --manifest option.
160 .TP
161 .I "--presources"
162 Prints offsets and names of manifest resources embedded in the assembly.
163 .TP
164 .I "--nested"
165 Dumps the contents of the NestedClass table.
166 .TP
167 .I "--param"
168 Dumps the contents of the Param table.
169 .TP
170 .I "--parconst"
171 Dumps the contents of the GenericParameterConstraint table.
172 .TP
173 .I "--property"
174 Dumps the contents of the Property table.
175 .TP
176 .I "--propertymap"
177 Dumps the contents of the PropertyMap table.
178 .TP
179 .I "--standalonesig"
180 Dumps the contents of the StandAloneSig table.
181 .TP
182 .I "--typedef"
183 Dumps the contents of the TypeDef table.
184 .TP
185 .I "--typespec"
186 Dumps the contents of the TypeSpec table.
187 .TP
188 .I "--typeref"
189 Dumps the contents of the TypeRef table.
190 .TP
191 .I "--blob"
192 Dumps the entire contents of the blob stream as hex.
193 .TP
194 .I "--strings"
195 Dumps the contents of the Strings heap.
196 .TP
197 .I "--userstrings"
198 Dumps the contents of the User-Strings heap
199 .PP
200 If no flags are specified the program dumps the content of the image
201 in a format that can be used to rountrip the code.
202 .PP
203 .SH ENVIRONMENT VARIABLES
204 .TP
205 .I "MONO_PATH"
206 Provides a search path to mono and mint where to look for library files.
207 Directories are separated by the platform path separator (colons on unix). Example:
208 .B /home/username/lib:/usr/local/mono/lib
209 .PP
210 .SH AUTHOR
211 monodis was written by Miguel de Icaza, Paolo Molaro and Dietmar Maurer.
212 .SH SEE ALSO
213 .BR pedump(1)