2003-12-27 Ben Maurer <bmaurer@users.sourceforge.net>
[mono.git] / mcs / class / Mono.CSharp.Debugger / ChangeLog
1 2003-12-27 Ben Maurer  <bmaurer@users.sourceforge.net>
2
3         * MonoSymbolFile.cs: Much, much better string writing.
4
5 2003-12-20 Ben Maurer  <bmaurer@users.sourceforge.net>
6
7         * MonoSymbolTable.cs: Fewer StringBuilder allocs.
8
9 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
10
11         * MonoSymbolWriter.cs: Create ArrayLists only when needed.
12
13 2003-12-07 Ben Maurer  <bmaurer@users.sourceforge.net>
14
15         * MonoSymbolTable.cs: It is faster to do a linear search
16         than it is to make a hashtable. Even though the linear
17         search is O(n^2) while the hashtable is O(n), the allocation
18         cost for a hashtable is *very* high, especially when only
19         a few members will be added.
20
21 2003-09-06  Martin Baulig  <martin@ximian.com>
22
23         * MonoSymbolFile.cs: Removed debugging output.
24
25 2003-08-05  Martin Baulig  <martin@ximian.com>
26
27         * MonoSymbolTable.cs (MethodEntry.Index): New public field.
28
29 2003-06-27  Zoltan Varga  <vargaz@freemail.hu>
30
31         * MonoSymbolWriter.cs: Enable calling of DefineDocument multiple
32         times with the same URL.
33
34 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
35
36         * MonoSymbolFile.cs: Fix off-by-one error.
37
38 2003-03-22  Martin Baulig  <martin@ximian.com>
39
40         * MonoSymbolTable.cs (MethodEntry.LocalNamesAmbiguous): New public
41         field.  Specifies whether two local variables have the same name.
42
43 2003-03-13  Martin Baulig  <martin@ximian.com>
44
45         Added basic support for lexical scopes.  This is just to tell a
46         debugger that a local variable is only available in a specific
47         lexical scope and that another variable of the same name may exist
48         in another lexical scope.  See debugger/test/TestLexicalScope.cs
49         for examples.
50
51         * MonoSymbolTable.cs (LexicalScopeEntry): New class.
52         (LocalVariableEntry): Added `BlockIndex' field which specifies the
53         lexical scope of this variable.
54
55         * MonoSymbolWriter.cs (SourceBlock): Removed, we're now using
56         LexicalScopeEntry instead.
57
58 2003-02-22  Martin Baulig  <martin@ximian.com>
59
60         * MonoSymbolTable.cs: Incremented version number.
61
62 2003-02-22  Martin Baulig  <martin@ximian.com>
63
64         * MonoSymbolFile.cs (MonoSymbolFile.FindMethod): Fixed a bug.
65         (MonoSymbolFile.MethodLookup): New method.
66
67 2003-02-18  Martin Baulig  <martin@ximian.com>
68
69         * MonoSymbolFile.cs (MonoSymbolFile.GetMethod): Added overloaded
70         version which takes a MethodBase.
71
72 2003-02-18  Martin Baulig  <martin@ximian.com>
73
74         * MonoSymbolTable.cs (MethodIndexEntry): New public struct.
75
76         * MonoSymbolFile.cs (MonoSymbolFile.GetMethodByToken): New method.
77
78 2003-02-18  Martin Baulig  <martin@ximian.com>
79
80         * MonoSymbolFile.cs (MonoSymbolFile.Assembly): New public property.
81
82         * MonoSymbolTable.cs (MethodEntry.MethodBase): New public property.
83         (MethodEntry.LocalTypes): New public variable.
84
85 2003-02-18  Martin Baulig  <martin@ximian.com>
86
87         * MonoSymbolFile.cs (MethodEntry.ThisTypeIndex): Renamed to
88         ClassTypeIndex; provide this for all methods so we can get the
89         class of static methods.
90
91 2003-02-10  Nick Drochak  <ndrochak@gol.com>
92
93         * Mono.CSharp.Debugger.build: passing the /r using an 'arg' node works.
94         The <include> node wasn't getting to the compiler. This fixes build
95         breakage on cygwin.
96
97         * MonoSymbolFile.cs: Qualify which Min method. Fixes build breakage
98         on cygwin.
99
100 2003-02-09  Martin Baulig  <martin@ximian.com>
101
102         * MonoSymbolWriter.cs (MonoSymbolWriter.ctor): We don't need the
103         `mbuilder_array' anymore.
104
105 2003-02-09  Martin Baulig  <martin@ximian.com>
106
107         * MonoSymbolWriter.cs (SourceFile): Derive from SourceFileEntry.
108         (SourceBlock): We don't need source lines here.
109         (SourceMethod): We're always constructed with source info.
110
111         * MonoSymbolTable.cs: Added support for namespaces.
112         (NamespaceEntry): New struct.
113         (SourceFileEntry.DefineNamespace): New method.
114         (MethodEntry.BuildLineNumberTable): The table is already sorted,
115         so we don't need to do this here.
116
117 2003-02-09  Martin Baulig  <martin@ximian.com>
118
119         * IMonoSymbolWriter.cs: Ooops, I forgot to remove this.
120
121 2003-02-08  Martin Baulig  <martin@ximian.com>
122
123         * MonoSymbolDocumentWriter.cs: Removed.
124
125         * MonoSymbolWriter.cs (SourceFile): Implement ISymbolDocumentWriter.
126
127 2003-02-08  Martin Baulig  <martin@ximian.com>
128
129         * MonoSymbolFile.cs (GetMethodSource): New public method.
130         (FindMethod): Return the correct index.
131
132 2003-02-07  Martin Baulig  <martin@ximian.com>
133
134         * MonoSymbolFile.cs (Methods, Sources): New public properties.
135
136 2003-02-07  Martin Baulig  <martin@ximian.com>
137
138         * MonoSymbolFile.cs (MonoSymbolFile.ReadSymbolFile): New public
139         static method, returns null (without throwing an exception) if the
140         assembly doesn't have any debugging info.
141
142 2003-02-07  Martin Baulig  <martin@ximian.com>
143
144         * MonoSymbolWriter.cs (MonoSymbolWriter.Initialize): Removed the
145         custom initialization function.
146
147         * MonoSymbolTableWriter.cs: Removed; the code is now in
148         MonoSymbolFile.cs and MonoSymbolWriter.cs.
149
150 2003-02-07  Martin Baulig  <martin@ximian.com>
151
152         * MonoSymbolFile.cs: The symbol file is now a resource in the
153         assembly instead of a separate file.
154
155         * MonoSymbolTable.cs: Did a few more cleanups, sort the line
156         number table and remove duplicate line numbers.
157
158 2003-02-05  Martin Baulig  <martin@ximian.com>
159
160         Modified the symbol file format to speed up method looks by name
161         and cleaned this up a lot.
162
163         * MonoSymbolFile.cs: New public class.  This is now a public class
164         and writes and reads the symbol file.
165
166         * IMonoBinaryReader.cs: Removed.
167
168         * MonoSymbolTable.cs: Set version number to 29.
169
170 2003-01-17  Zoltan Varga  <vargaz@freemail.hu>
171
172         * MonoSymbolWriter.cs (OpenMethod): Make it work on constructors.
173
174 2002-10-13  Martin Baulig  <martin@gnome.org>
175
176         * MonoSymbolTable.cs: Set version number to 28.
177         (SourceFileEntry): Read the methods when they're needed.
178         (MethodSourceEntry): Made this a struct, not a class.
179
180 2002-10-13  Martin Baulig  <martin@gnome.org>
181
182         * MonoSymbolTable.cs: Set version number to 27.  Added a source
183         file table which is used to search a method by source file + line number.
184
185 2002-09-21  Martin Baulig  <martin@gnome.org>
186
187         * MonoSymbolTable.cs: Set version number to 26.  Removed all the dynamic
188         stuff, this library now just deals with the compiler generated symbol table.
189         The dynamic stuff is private between the JIT and the debugger.
190
191 2002-09-21  Martin Baulig  <martin@gnome.org>
192
193         * MonoSymbolTable.cs: Set version number to 25.  Added information about
194         local variables.
195
196 2002-09-20  Martin Baulig  <martin@gnome.org>
197
198         * MonoSymbolTable.cs: Set version number to 24.  Added a type index
199         table.  Write the type of a local variable or a parameter as an index
200         into this table.
201
202 2002-09-20  Martin Baulig  <martin@gnome.org>
203
204         * IMonoSymbolWriter.cs: Remove all the unused interfaces.
205
206 2002-09-20  Martin Baulig  <martin@gnome.org>
207
208         * MonoSymbolTable.cs: Set version number to 23, include the size
209         of a variable.
210
211 2002-09-20  Martin Baulig  <martin@gnome.org>
212
213         * MonoSymbolTable.cs: Set version number to 22.  Provide information
214         about parameters and local variables.
215
216 2002-09-20  Martin Baulig  <martin@gnome.org>
217
218         * IMonoSymbolWriter.cs: Use fullly qualified name for
219         System.Diagnostics.SymbolStore.ISymbolWriter rather than `using' this
220         namespace.  This allows us to use the name `ISymbolWriter' in our own
221         code.
222
223 2002-09-18  Martin Baulig  <martin@gnome.org>
224
225         * MonoSymbolTable.cs: Set version number to 21.  Encode the source file
226         as a 4-byte length field followed by the UTF8 encoded string.
227
228 2002-09-18  Martin Baulig  <martin@gnome.org>
229
230         * IMonoBinaryReader.cs: New interface.
231
232         * MonoSymbolTable.cs: Use IMonoBinaryReader instead of binary reader.
233
234 2002-09-16  Martin Baulig  <martin@gnome.org>
235
236         * MonoSymbolTable.cs: Set version number to 20.
237
238 2002-09-14  Martin Baulig  <martin@gnome.org>
239
240         * MonoSymbolWriter.cs, IMonoSymbolWriter.cs, MonoSymbolTableWriter.cs:
241         Make all classes and interfaces which don't need to be public internal.
242
243 2002-09-14  Martin Baulig  <martin@gnome.org>
244
245         * MonoSymbolTable.cs: Use only CLS-compliant types here, bumped version
246         number to 19.
247
248         * MonoSymbolTableReader.cs: Removed, this is now in the debugger.
249
250 2002-09-03  Martin Baulig  <martin@gnome.org>
251
252         * AssemblerWriterI386.cs, IAssemblerWriter.cs, MonoDwarfFileWriter.cs,
253         README, README.relocation-table, csharp-lang.[ch], gdb-csharp-support.patch,
254         gdb-variable-scopes.patch: Removed.
255
256 2002-09-03  Martin Baulig  <martin@gnome.org>
257
258         * MonoSymbolTableReader.cs (MonoSymbolTableReader.ImageFile): New
259         public property.
260
261         * MonoSymbolTable.cs: Bumped version number to 18.
262
263 2002-08-27  Martin Baulig  <martin@gnome.org>
264
265         * MonoSymbolTable.cs (MethodAddress): Removed `TrampolineAddress'.
266
267 2002-08-27  Martin Baulig  <martin@gnome.org>
268
269         * MonoSymbolTable.cs: Changed the file format in a way that allows us
270         open it read-only and to use a specially malloced area for all the
271         dynamic data.   
272
273 2002-08-25  Martin Baulig  <martin@gnome.org>
274
275         * MonoSymbolTableReader.cs: New file.  This is the reader for the
276         new symbol file format.
277
278 2002-08-24  Martin Baulig  <martin@gnome.org>
279
280         * MonoSymbolTable.cs, MonoSymbolTableWriter.cs: New files.  This
281         creates a binary application.dbg file which will be used by the
282         JIT to display source lines for exceptions.
283
284         * list.unix: Disabled the dwarf file writer in the build.
285
286 2002-08-23  Martin Baulig  <martin@gnome.org>
287
288         * MonoSymbolWriter.cs (MonoSymbolWriter.Initialize): Added
289         assembly name argument.  Since the symbol writer needs to read the
290         final assembly, we need to give it its full pathname.
291
292 2002-08-23  Martin Baulig  <martin@gnome.org>
293
294         * makefile.gnu, list.unix: Added.
295
296 2002-07-05  Martin Baulig  <martin@gnome.org>
297
298         * MonoDwarfFileWriter.cs: Added support for types in referenced assemblies.
299
300 2002-07-05  Martin Baulig  <martin@gnome.org>
301
302         * MonoDwarfFileWriter.cs: Added support for arrays.
303
304         * gdb-csharp-support.patch: Updated.
305
306 2002-06-29  Martin Baulig  <martin@gnome.org>
307
308         * MonoDwarfFileWriter.cs (DieInheritance): Make this actually work.
309
310 2002-06-29  Martin Baulig  <martin@gnome.org>
311
312         * MonoDwarfFileWriter.cs, MonoSymbolWriter.cs: Put all TAG_subprogram's into their
313         corresponding struct/class declarations.
314
315 2002-06-28  Martin Baulig  <martin@gnome.org>
316
317         * gdb-csharp-support.patch: Updated.
318
319 2002-06-28  Martin Baulig  <martin@gnome.org>
320
321         * MonoDwarfFileWriter.cs: Use a TAG_string_type when we're using GNU extensions.
322         Make static struct/class fields actually work.  Provide a TAG_typedef for struct's
323         and classes.
324
325 2002-05-30  Martin Baulig  <martin@gnome.org>
326
327         * IMonoSymbolWriter (IMonoSymbolWriter): Added custom `Initialize' method.
328
329         * MonoSymbolWriter.cs (Initialize): The ISymbolWriter's `Initialize' method
330         is no longer supported and throws an exception.
331         (Initialize (string, string[])): New custom initialization function.
332
333         * MonoDwarfFileWriter.cs (DwarfFileWriter): Added `string[] args' argument
334         to the constructor to pass command line arguments.
335
336         * gdb-csharp-support.patch: Updated for GDB 5.2.
337
338 2002-05-30  Martin Baulig  <martin@gnome.org>
339
340         * MonoSymbolWriter.cs (MonoSymbolWriter): The constructor now get's the
341         AssemblyBuilder's `methods' array as third argument.
342         (OpenMethod): Use this array to get the method builder rather than using an
343         interncall for it.
344         (get_method_builder): Removed this interncall.
345
346 2002-05-25  Martin Baulig  <martin@gnome.org>
347
348         * MonoDwarfFileWriter.cs: Finished the type rewrite, put back strings and arrays.
349
350 2002-05-24  Martin Baulig  <martin@gnome.org>
351
352         * IMonoSymbolWriter.cs (ISourceMethod): Added `FullName' and `Parameters'.
353         (ITypeHandle): New interface.
354
355         * DwarfFileWriter.cs: Largely reorganized the type writing code.  Types are
356         now represented by ITypeHandle objects which are stored in a per-dwarf-writer
357         hash table.  At the moment, all types still need to be in one compile unit due
358         to lacking support in gdb - but this new type code here already supports this.
359
360         * MonoSymbolWriter.cs: Moved all the subclasses to the top-level and made them
361         public, cleaned up the code, put everything into one compile unit.
362         (DefineLocalVariable): Added a version of this function which takes useful args.
363
364 2002-05-22  Martin Baulig  <martin@gnome.org>
365
366         * IMonoSymbolWriter.cs (IMonoSymbolWriter): Added `Sources' and `Methods'
367         properties.
368
369         * MonoDwarfFileWriter.cs (WriteSymbolTable): New public method.  Moved the
370         code that writes the "mono_line_numbers" section here from the LineNumberEngine.
371
372 2002-05-22  Martin Baulig  <martin@gnome.org>
373
374         * IMonoSymbolWriter.cs (IVariable): Replaced Token with `ISourceMethod Method'.
375
376         * MonoSymbolWriter.cs (MonoSymbolWriter): The constructor now has an additional
377         ModuleBuilder argument.
378         (OpenMethod): Immediately call the `get_method' interncall to get the MethodBase
379         from the token, then store the MethodBase instead of the token.  The token may
380         still change during the metadata library's fixup process.
381         (DoFixups): When the image has been written to disk, call the GetToken () method
382         on all MethodBuilders and all ConstructorBuilders to get the final metadata tokens.
383
384 2002-05-22  Martin Baulig  <martin@gnome.org>
385
386         * AssemblerWriterI386.cs: Don't use GNU extensions and produce assembler
387         output which is free of comments and extra whitespaces so that it's suitable
388         for `as -f'.
389
390 2002-05-22  Martin Baulig  <martin@gnome.org>
391
392         * IMonoSymbolWriter.cs (ISourceMethod): Replaced `MethodInfo MethodInfo' with
393         `MethodBase MethodBase' and added `Type ReturnType'.  We're now correctly
394         dealing with constructors and not crashing anymore.
395
396 2002-05-21  Martin Baulig  <martin@gnome.org>
397
398         * MonoDwarfFileWriter.cs: Write a special line number table which can be read
399         in by the metadata library to get line number information in backtraces.
400
401 2002-05-06  Martin Baulig  <martin@gnome.org>
402
403         * MonoSymbolWriter.cs (MonoSymbolWriter.Close): Use Assembly.LoadFrom (), not
404         AppDomain.Load () to load the assembly.
405
406 2002-04-26  Martin Baulig  <martin@gnome.org>
407
408         * gdb-csharp-support.patch: A patch for GDB (against the latest CVS version)
409         to implement C# support.
410
411         * csharp-lang.c, csharp-lang.h, csharp-mono-lang.c: Copy these into your GDB
412         source directory after applying the patch.
413
414 2002-04-26  Martin Baulig  <martin@gnome.org>
415
416         * MonoDwarfFileWriter.cs (DieInternalString): Removed.
417
418 2002-04-25  Martin Baulig  <martin@gnome.org>
419
420         * MonoDwarfFileWriter.cs: Reflect latest MonoString changes.
421
422 2002-04-13  Martin Baulig  <martin@gnome.org>
423
424         * IMonoSymbolWriter.cs (ISourceBlock): Added `Blocks' property and `AddBlock'
425         method to support nested blocks.
426
427         * MonoSymbolWriter.cs: Correctly handle nested blocks.
428
429         * MonoDwarfFileWriter.cs (DieMember): Provide info for all fields, not just for
430         public ones; also added DW_AT_accessibility.
431         (DieVariable): Reflected latest debug-symfile.c changes.
432
433 2002-04-12  Martin Baulig  <martin@gnome.org>
434
435         * gdb-variable-scopes.patch: A patch for GDB (against the latest CVS version)
436         to implement variable lifetimes.
437
438 2002-04-12  Martin Baulig  <martin@gnome.org>
439
440         * MonoDwarfFileWriter.cs (DieVariable): Provide info about the variable's
441         lifetime using DW_AT_begin_scope and a new baulig extension DW_AT_end_scope.
442
443 2002-03-29  Martin Baulig  <martin@gnome.org>
444
445         * AssemblerWriterI386.cs: Rewrote most of the string output function, do the
446         number->string conversion manually. It's now taking about 15 seconds to write
447         a symbol file for MCS, no longer more than a minute.
448
449         * MonoDwarfFileWriter.cs: Added some profiling code, speeded things up, fixed
450         a few bugs.
451
452 2002-03-25  Martin Baulig  <martin@gnome.org>
453
454         * MonoDwarfFileWriter.cs (CreateType): Return a `DieType'.
455         (RegisterType): Add the type to the type hash before creating dependency types
456         so we don't get recursion loops.
457         (RegisterPointerType): New func to register a "pointer to type" type.
458         (DieTypeDef, DiePointerType, DieArrayType, DieStringType, DieClassType): New
459         types; added support for strings, arrays and basic support for classes.
460         
461 2002-03-24  Martin Baulig  <martin@gnome.org>
462
463         * IMonoSymbolWriter.cs: Killed all methods in this interface, no longer needed.
464
465         * MonoSymbolWriter.cs (MonoSymbolWriter): The constructor now takes a string
466         argument which is the full pathname of the assembly - you must call Close()
467         after the assembly has been written to disk since the symbol writer needs to
468         load the finished assembly to get its metadata.
469
470         * MonoDwarfFileWriter.cs: Added support for enums and structs.
471         
472 2002-03-24  Martin Baulig  <martin@gnome.org>
473
474         * MonoDwarfFileWriter.cs: Added support for method parameters.
475
476 2002-03-24  Martin Baulig  <martin@gnome.org>
477
478         * IMonoSymbolWriter.cs (IMonoSymbolWriter): Removed my custom OpenMethod(),
479         we're now using the ISymbolWriter's method.
480         (IVariable): Added `byte[] Signature' property.
481
482         * MonoSymbolWriter.cs (SetAssembly): New method. This must be called before
483         Close(); the assembly parameter is the already-written assembly, ie. it must
484         contain the full metadata.
485         (OpenMethod): Only take the token argument and set MethodInfo later in DoFixups.
486         (SetMethodSourceRange): You must call this function to tell the symbol writer
487         in which source file the method is defined.
488         (DefineLocal): Store the signature in the local.
489         (DoFixups): Use two new interncalls to set the SourceMethod's MethodInfo field
490         and the LocalVariable's Type field.
491
492 2002-03-23  Martin Baulig  <martin@gnome.org>
493
494         * IMonoSymbolWriter.cs (ISourceBlock): New interface.
495         (ILocalVariable): Renamed this interface to IVariable.
496         (IVariable): Added Line, Type, Token.
497         (ILocalVariable, IMethodParameter): New interfaces, derive from IVariable.
498         (ISourceMethod): Added Blocks. Renamed FirstLine and LastLine to Start and End,
499         changed their type to ISourceLine. Removed CodeSize.
500         (ISourceLine): Renamed Line to Row, added Column. Added OffsetType and Offset.
501
502         * MonoDwarfFileWriter.cs (MonoDwarfFileWriter.DieLexicalBlock): New class.
503         (MonoDwarfFileWriter.DieMethodVariable): New class.
504
505         * MonoSymbolWriter.cs (OpenScope, CloseScope): Implemented.
506         Reflected latest IMonoSymbolWriter interface changes.
507
508 2002-03-20  Martin Baulig  <martin@gnome.org>
509
510         * IAssemblerWriter.cs: New interface.
511
512         * AssemblerWriterI386.cs: New class.
513
514         * MonoDwarfFileWriter.cs: Use the IAssemblerWriter interface to make this class
515         platform and assembler independent.
516
517 2002-03-20  Martin Baulig  <martin@gnome.org>
518
519         * IMonoSymbolWriter.cs (ISourceMethod): Added FirstLine, LastLine, CodeSize and
520         Token properties.
521
522         * MonoDwarfFileWriter.cs: Implemented line number support.
523
524 2002-03-19  Martin Baulig  <martin@gnome.org>
525
526         * IMonoSymbolWriter.cs (ISourceFile, ISourceMethod, ISourceLine, ILocalVariable):
527         New interfaces.
528
529         * IMonoSymbolWriter.cs (OpenMethod): Take a System.Reflection.MethodInfo, not
530         a string.
531
532 2002-03-19  Martin Baulig  <martin@gnome.org>
533
534         This is an implementation of the System.Diagnostics.SymbolStore.SymbolWriter
535         interface. It's still work in progress and not yet used anywhere.
536
537         There is some preliminary documentation in the source files and some more
538         docu in the README and README.relocation-table files.
539
540         * IMonoSymbolWriter.cs: New file.
541         * MonoDwarfFileWriter.cs: New file.
542         * MonoSymbolDocumentWriter.cs: New file.
543         * MonoSymbolWriter.cs: New file.
544
545         * README, README.relocation-table: Documentation.
546