df49d5f60ca1cfea3eecdc90d5ab47e1d2dcc695
[mono.git] / mcs / class / Mono.CompilerServices.SymbolWriter / ChangeLog
1 2009-04-15  Martin Baulig  <martin@ximian.com>
2
3         * MonoSymbolWriter.cs: Move `ISourceFile', `ICompileUnit' and
4         `IMethodDef' into MonoSymbolFile.cs.  This allows us to use the
5         symbol reader part without MonoSymbolWriter.cs.
6
7 2009-04-15  Martin Baulig  <martin@ximian.com>
8
9         * MonoSymbolTable.cs
10         (LineNumberTable.DW_LNE_MONO__extensions_start): New const.
11         (LineNumberTable.DW_LNE_MONO__extensions_end): New const.
12         (LineNumberTable.DoRead): Ignore unknown extended opcodes if
13         they're within the Mono extension range.
14
15 2009-03-05  Martin Baulig  <martin@ximian.com>
16
17         * MonoSymbolTable.cs
18         (CompileUnitEntry.IncludeFiles): New public property.
19         (CompileUnitEntry.ReadData): Also read include files.
20
21 2008-11-19  Marek Safar  <marek.safar@gmail.com>
22
23         * MonoSymbolWriter.cs, MonoSymbolTable.cs: Change always boxed
24         value type LineNumberEntry to class. It saves 19MB for corlib
25         compilation.
26
27 2008-11-17  Andreia Gaita <avidigal@novell.com>
28
29         * Makefile: Remove uneeded win32-specific hack
30
31 2008-10-15  Cedric Vivier  <cedricv@neonux.com>
32
33         * SymbolWriterImpl.cs: implement `SetMethodSourceRange` using the
34         new underlying MonoSymbolWriter's API so that the symbol files
35         generated by SRE-using compiler are useful again.
36
37 2008-09-23  Marek Safar  <marek.safar@gmail.com>
38
39         * Makefile: Use bootstrap profile to build with correct symbol
40         writer.
41
42 2008-06-18  Martin Baulig  <martin@ximian.com>
43
44         * MonoSymbolTable.cs
45         (OffsetTable): Bump version to 50.0.
46
47 2008-06-18  Martin Baulig  <martin@ximian.com>
48
49         * MonoSymbolTable.cs
50         (OffsetTable.MinorVersion): Bump to 7.
51         (OffsetTable.Flags): New public enum.
52         (OffsetTable.FileFlags): New public property.
53         (OffsetTable.IsAspxSource): Removed.
54
55 2008-06-17  Martin Baulig  <martin@ximian.com>
56
57         * MonoSymbolTable.cs
58         (MethodEntry.Flags): Removed `IsCompilerGenerated'.
59
60 2008-06-16  Martin Baulig  <martin@ximian.com>
61
62         * MonoSymbolWriter.cs
63         (SourceMethodBuilder.SetCompilerGenerated): Removed; we now use
64         the `DebuggerHiddenAttribute'.
65
66 2008-06-11  Martin Baulig  <martin@ximian.com>
67
68         * SymbolWriterImpl.cs: Put this back and make it work with the
69         current symbol writer.
70
71 2008-06-11  Martin Baulig  <martin@ximian.com>
72
73         * MonoSymbolWriter.cs
74         (MonoSymbolWriter.OpenMethod): Maintain a method stack, so we can
75         now recursively call OpenMethod().
76
77 2008-06-11  Martin Baulig  <martin@ximian.com>
78
79         * MonoSymbolTable.cs
80         (SourceFileEntry.WriteData): Silently ignore non-existing files.
81
82 2008-06-11  Martin Baulig  <martin@ximian.com>
83
84         * MonoSymbolWriter.cs
85         (MonoSymbolWriter.SetRealMethodName): Removed, call it on the
86         `SourceMethodBuilder'.
87         (MonoSymbolWriter.SetCompilerGenerated): Likewise.
88
89 2008-06-11  Martin Baulig  <martin@ximian.com>
90
91         * MonoSymbolWriter.cs
92         (ISourceMethod): Renamed to `IMethodDef'.
93         (SourceMethodBuilder): New public class.
94         (MonoSymbolWriter.OpenMethod): Added `int ns_id' argument and
95         return a `SourceMethodBuilder'.
96
97 2008-06-10  Martin Baulig  <martin@ximian.com>
98
99         * MonoSymbolTable.cs
100         (OffsetTable.MinorVersion): Bump to 6.  There were no changes to
101         the file format, but we were generating incorrect source file
102         indices in the line number table due to a bug, which made
103         backtraces report an incorrect source file.
104
105 2008-06-10  Martin Baulig  <martin@ximian.com>
106
107         * MonoSymbolWriter.cs
108         (MonoSymbolWriter.MarkSequencePoint): Added overloaded version
109         taking a `SourceFileEntry' instead of a file index.
110
111 2008-06-10  Martin Baulig  <martin@ximian.com>
112
113         * MonoSymbolWriter.cs
114         (MonoSymbolWriter.CloseMethod): Quick-fix; still a lot of broken
115         code out there.
116
117 2008-06-05  Martin Baulig  <martin@ximian.com>
118
119         * MonoSymbolTable.cs
120         (MethodEntry.Flags): New public enum.
121         (MethodEntry.MethodFlags): New public fields.
122         (MethodEntry.LocalNamesAmbiguous): Removed; this is now part of
123         the `MethodFlags'.
124
125         * MonoSymbolWriter.cs
126         (MonoSymbolWriter.SetCompilerGenerated): New public method.
127
128 2008-06-02  Martin Baulig  <martin@ximian.com>
129
130         * MonoSymbolWriter.cs
131         (ICompileUnit): New public interface.
132         (MonoSymbolWriter.Sources): Removed.
133         (MonoSymbolWriter.OpenMethod): Take an `ICompileUnit', removed
134         `startRow', `startColumn', `endRow' and `endColumn'.
135         (MonoSymbolWriter.DefineCompilationUnit): New public method.
136         (MonoSymbolWriter.DefineNamespace): Operate on `ICompileUnit'.
137
138         * MonoSymbolFile.cs
139         (MonoSymbolFile.CompileUnit): New public properties.
140
141         * MonoSymbolTable.cs
142         (OffsetTable): Replace `Version' by `MajorVersion' and
143         `MinorVersion'.  Add `CompileUnitCount', `CompileUnitTableOffset'
144         and `CompileUnitTableSize'.
145         (CompileUnitEntry): New public method.
146         (LineNumberTable): Removed `StartFile' and `StartRow'.
147         (MethodEntry): Removed `StartRow' and `EndRow'.
148
149 2008-06-02  Martin Baulig  <martin@ximian.com>
150
151         * SymbolWriterImpl.cs: Removed.
152
153 2008-05-28  Martin Baulig  <martin@ximian.com>
154
155         * MonoSymbolTable.cs
156         (MethodIndexEntry): Removed.
157         (MethodEntry): Moved everything into the data section, so it can
158         be read dynamically on-the-fly.  The `MethodEntry' now has a fixed
159         size of 12 bytes in the symbol file containing only token, data
160         offset and line number table offset.
161
162 2008-05-28  Martin Baulig  <martin@ximian.com>
163
164         * MonoSymbolTable.cs
165         (MethodEntry.LocalTypeIndices): Removed.
166         (MethodEntry.GetLineNumberTable): New public method; replaces the
167         `LineNumbers' and `NumLineNumbers' fields.
168         (MethodEntry.GetLocals): New public method; replaces the `Locals'
169         and `NumLocals' fields.
170         (MethodEntry.GetCodeBlocks): New public method; replaces the
171         `CodeBlocks' and `NumCodeBlocks' fields.
172         (MethodEntry.GetScopeVariables): New public method; replaces the
173         `ScopeVariables' and `NumScopeVariables' fields.
174         (MethodEntry.GetRealName): New public method; replaces `RealName'.
175         (MethodEntry): Removed the old fields.
176
177 2008-05-28  Martin Baulig  <martin@ximian.com>
178
179         * MonoSymbolTable.cs
180         (MethodSourceEntry): Removed.
181         (SourceFileEntry.Methods): Removed.
182
183 2008-05-26  Martin Baulig  <martin@ximian.com>
184
185         * MonoSymbolWriter.cs
186         (MonoSymbolWriter.DefineDocument): Added overloaded version taking
187         additional `byte[] guid' and `byte[] hash' arguments.
188
189         * MonoSymbolFile.cs
190         (OffsetTable.IsAspxSource): New public field.
191         (SourceFileEntry): Completely redesigned this; only write index
192         and data offset, everything else goes into the data section.
193         (SourceFileEntry.AutoGenerated): New public property.
194         (SourceFileEntry.CheckChecksum): New public method.
195
196 2008-05-16  Martin Baulig  <martin@ximian.com>
197
198         * MonoSymbolTable.cs
199         (LineNumberEntry.IsHidden): New public field.
200         (LineNumberTable): Add support for hidden line numbers.
201
202         * MonoSymbolWriter.cs
203         (MonoSymbolWriter.MarkSequencePoint): Add overloaded version
204         taking an additional `bool is_hidden' argument.
205
206 2008-05-05  Martin Baulig  <martin@ximian.com>
207
208         * MonoSymbolFile.cs
209         (MonoSymbolFile.OffsetTable): New public property.
210         (MonoSymbolFile.FileName): New public readonly field.
211
212         * MonoSymbolTable.cs
213         (OffsetTable): Make this a class and not a struct.
214         (OffsetTable): Add `LineNumberTable_LineBase',
215         `LineNumberTable_LineRange' and `LineNumberTable_OpcodeBase'.
216         (LineNumberEntry): Removed the reading/writing functions.
217         (LineNumberTable): Get `LineBase', `LineRange' and `OpcodeBase'
218         from the `OffsetTable' rather than hardcoding it here.
219         (MethodEntry): Make `NumLineNumbers' and `LineNumbers' properties;
220         massive cleanup, use leb128 everywhere and removed all the
221         obsolete fields.
222
223 2008-04-29  Martin Baulig  <martin@ximian.com>
224
225         * MonoSymbolTable.cs
226         (OffsetTable.Version): Bump to 42.
227         (LineNumberTable): New public class.  Provides a new line number
228         table format which is based on Dwarf 2.
229         (MethodEntry): Replaced BuildLineNumberTable() by
230         CheckLineNumberTable(); we're now more strict than we were before
231         and disallow not monotonic increasing entries,  we don't check for
232         duplicates anymore since the new LineNumberTable takes care of that.
233         (LineEntry): Added public `File' field which is a file index.
234
235         * MonoSymbolWriter.cs
236         (MonoSymbolWriter.MarkSequencePoint): Added `int file' argument.
237
238 2008-04-29  Martin Baulig  <martin@ximian.com>
239
240         **** Kahalo changes start here ****
241
242 2008-05-05  Martin Baulig  <martin@ximian.com>
243
244         Drop support for old pre-terrania symbol files.
245
246         * MonoSymbolFile.cs
247         (MonoSymbolFile.CompatibilityMode): Removed.
248
249         * MonoSymbolTable.cs
250         (LexicalBlockEntry): Removed this obsolete class.
251
252 2008-04-02  Martin Baulig  <martin@ximian.com>
253
254         * *.cs: Remove the `#if !DISABLE_TERRANIA_CHANGES' conditionals.
255
256 2008-03-14  Martin Baulig  <martin@ximian.com>
257
258         Merged the debugger's `terrania' branch into trunk.
259
260 2008-03-13  Martin Baulig  <martin@ximian.com>
261
262         * *.cs: Add `DISABLE_TERRANIA_CHANGES' conditionals everywhere
263         around the new code; they'll be removed when I'm back from my
264         vacations.
265
266 2008-03-13  Martin Baulig  <martin@ximian.com>
267
268         * MonoSymbolTable.cs
269         (LexicalBlockEntry): Mark this as obsolete.
270
271 2008-03-11  Martin Baulig  <martin@ximian.com>
272
273         * MonoSymbolTable.cs (MethodEntry): Removed `LocalTypeIndices'.
274
275 2008-03-10  Martin Baulig  <martin@ximian.com>
276
277         * MonoSymbolTable.cs
278         (LocalVariableEntry): Removed the `Signature' field; we don't
279         write this into the symbol file anymore.
280
281         * MonoSymbolWriter.cs
282         (MonoSymbolWriter.DefineLocalVariable): The `byte[] signature'
283         argument is now obsolete.
284
285 2008-02-19  Martin Baulig  <martin@ximian.com>
286
287         * MonoSymbolFile.cs
288         (MonoSymbolFile.Version): New public readonly field.
289         (MonoSymbolFile.CompatibilityMode): Likewise; this is enabled if
290         we're reading an old `39' file.
291
292         * MonoSymbolTable.cs
293         (OffsetTable.CompatibilityVersion): New public const; we keep
294         backwards compatibility with this version.
295         (OffsetTable.Write): Add `version' argument; allow writing the old
296         file format.
297         (MethodEntry): Check `file.CompatiblityMode'.
298
299 2008-02-19  Martin Baulig  <martin@ximian.com>
300
301         * MonoSymbolWriter.cs
302         (MonoSymbolWriter.SetRealMethodName): New public method.
303
304         * MonoSymbolTable.cs
305         (MethodEntry.RealName): New public field; this is only used for
306         anonymous methods and iterators.
307
308 2008-02-15  Martin Baulig  <martin@ximian.com>
309
310         * MonoSymbolTable.cs
311         (CodeBlockEntry): New public class.
312         (MethodEntry): Replace the old lexical blocks with a new concept
313         of `code blocks'.  Keep backwards compatibility.
314
315         * MonoSymbolWriter.cs
316         (MonoSymbolWriter): Add OpenCompilerGeneratedBlock(),
317         CloseCompilerGeneratedBlock(), StartIteratorBody(),
318         EndIteratorBody(), StartIteratorDispatcher(),
319         EndIteratorDispatcher().        
320
321 2008-02-02  Martin Baulig  <martin@ximian.com>
322
323         * MonoSymbolTable.cs
324         (OffsetTable.Version): Bump to 40.
325         (OffsetTable): Add `AnonymousScopeCount',
326         `AnonymousScopeTableOffset' and `AnonymousScopeTableSize'.
327         (CapturedVariable): New public struct.
328         (CapturedScope): New public struct.
329         (ScopeVariable): New public struct.
330         (AnonymousScopeEntry): New public class.
331         (SourceFileEntry.DefineMethod): Added overloaded version taking an
332         additional `ScopeVariable[]' argument.
333
334         * MonoSymbolFile.cs
335         (MonoSymbolFile.AnonymousScopeCount): New public property.
336         (MonoSymbolFile.GetAnonymousScope): New public method.
337
338         * MonoSymbolWriter.cs
339         (MonoSymbolWriter.DefineAnonymousScope): New public method.
340         (MonoSymbolWriter.DefineCapturedLocal): New public method.
341         (MonoSymbolWriter.DefineCapturedParameter): New public method.
342         (MonoSymbolWriter.DefineCapturedThis): New public method.
343         (MonoSymbolWriter.DefineCapturedScope): New public method.
344         (MonoSymbolWriter.DefineScopeVariable): New public method.
345
346 2008-02-02  Martin Baulig  <martin@ximian.com>
347
348         ***** Terrania changes start at this point *****
349
350 2007-08-27  Jb Evain  <jbevain@novell.com>
351
352         * MonoSymbolFile.cs, SymbolWriterImpl.cs: add some Cecil specific
353         code protected by a CECIL defined.
354
355 Mon Jan 29 16:51:33 CET 2007 Paolo Molaro <lupus@ximian.com>
356
357         * MonoSymbolWriter.cs: unlink the file before writing it, since it may
358         be mmapped by the runtime.
359
360 2007-01-29  Martin Baulig  <martin@ximian.com>
361
362         * MonoSymbolFile.cs
363         (MonoSymbolFile.Assembly): Removed this property.
364         (MonoSymbolFile.Guid): New public property.
365
366 2006-09-24  Joshua Tauberer  <jit@occams.info>
367
368         * MonoSymbolFile.cs: Allow MonoSymbolFile to be created
369           without passing a System.Reflection.Assembly, so we can
370           use this with Cecil.  Only the GUID check is avoided.
371
372 2005-09-14  Martin Baulig  <martin@ximian.com>
373
374         * MonoSymbolTable.cs (OffsetTable): Bump version to 39.
375         (LocalVariableEntry.Index): New field.
376
377         * MonoSymbolWriter.cs
378         (MonoSymbolWriter.DefineLocalVariable): Added `int index' argument.
379
380         * MonoSymbolFile.cs
381         (MonoDebuggerSupport.GetLocalIndex): New method.
382
383 2005-09-05  Martin Baulig  <martin@ximian.com>
384
385         * MonoSymbolFile.cs (MonoDebuggerSupport): Make this internal and
386         move everything we don't need here into the debugger.
387
388 2005-06-20  Chris Toshok  <toshok@ximian.com>
389
390         * MonoSymbolFile.cs (MonoSymbolFile.Dispose): make public.
391
392 2005-05-25  Lluis Sanchez Gual  <lluis@novell.com>
393
394         * SymbolWriterImpl.cs: An implementation of ISymbolWriter. It is just a
395         wrapper for the MonoSymbolWriter class that mcs is using.
396
397 2005-04-04  Marek Safar  <marek.safar@seznam.cz>
398
399         * MonoSymbolFile.cs: Removed unused fields.
400
401 2005-02-10  Martin Baulig  <martin@ximian.com>
402
403         * MonoSymbolFile.cs
404         (MonoDebuggerSupport.MakeArrayType): New public method.
405         (MonoDebuggerSupport.ResolveType): New public method.
406         (MonoDebuggerSupport.GetTypeToken): New public method.
407
408 2005-02-10  Martin Baulig  <martin@ximian.com>
409
410         * MonoSymbolFile.cs (MonoDebuggerSupport.GetMethodIndex): New
411         public method.
412
413 2004-11-23  Ben Maurer  <bmaurer@ximian.com>
414
415         * MonoSymbolFile.cs (CreateSymbolFile): Take a filestream to
416         write to. Do not return a byte array.
417
418         (MyMemoryStream): Unused now.
419
420         * MonoSymbolWriter.cs: Take advantage of the api change above.
421
422         Overall, this prevents us from having to allocate the debug file
423         in ram. For corlib, the debug file is about 1.5 mb. So it takes up
424         over 3 mb (you must write it in chunks then get the big array)
425
426         With the file stream, it takes up 4 kb or so for the buffer.
427
428 2004-10-20  Martin Baulig  <martin@ximian.com>
429
430         * MonoSymbolFile.cs (MonoSymbolFile.Write): Sort the method table
431         before actually writing it to disk and update MethodEntry.Index.
432
433         * MonoSymbolTable.cs (MethodEntry.Index): Make this a writable
434         property; set it after creating all the methods and sorting the
435         method table.
436
437 2004-09-21  Martin Baulig  <martin@ximian.com>
438
439         * MonoSymbolFile.cs (MonoDebuggerSupport.CheckRuntimeVersion): New
440         public method.
441
442 2004-08-27  Martin Baulig  <martin@ximian.com>
443
444         * MonoSymbolFile.cs (MonoSymbolFile..ctor): Read the GUID from the
445         symbol file before reading the OffsetTable.
446
447 2004-08-27  Chris Toshok  <toshok@ximian.com>
448
449         * MonoSymbolFile.cs (MonoSymbolFile.ReadSymbolFile): pass name to
450         MonoSymbolFile.ctor, not filename, so we load the .mdb file
451         instead of the .dll.
452         (MonoSymbolFile.ctor): pass FileAccess.Read to the FileStream
453         ctor.
454
455 2004-08-27  Martin Baulig  <martin@ximian.com>
456
457         * MonoSymbolFile.cs (MonoDebuggerSupport.GetGuid): The function is
458         called Module.Mono_GetGuid(), not Module.MonoDebugger_GetGuid().
459
460 2004-07-30  Martin Baulig  <martin@ximian.com>
461
462         The library is now called Mono.CompilerServices.SymbolWriter.dll
463         and is in the Mono.CompilerServices.SymbolWriter namespace.
464
465         * MonoSymbolFile.cs (MonoDebuggerSupport.GetGuid): New public
466         static method.
467         (MonoSymbolFile.WriteString): Use the BinaryWriter's method.
468         (MonoSymbolFile.ReadString): Use the BinaryReader's method.
469         (MonoSymbolFile.Write): Write the module's Guid into the symbol
470         file.
471
472         * MonoSymbolTable.cs, MonoSymbolWriter.cs: Reworked the API.
473
474 2004-07-27  Martin Baulig  <martin@ximian.com>
475
476         * MonoSymbolFile.cs (MonoSymbolFile.Write): Sort the methods
477         according to their token values.
478         (MonoSymbolFile.ReadSymbolFile): Support reading the debugging
479         information from an external ".mdb" file.
480
481         * MonoSymbolTable.cs
482         (SourceFileEntry): Make the .ctor protected, not internal.
483         (SourceFileEntry.DefineMethod): This is no longer specific to
484         System.Reflection(.Emit).
485         (MethodEntry): We don't need the class and parameter types, the
486         JIT is already getting this information automatically.
487         (MethodEntry.ClassTypeIndex): Make this obsolete.
488         (MethodEntry.ParamTypeIndicies): Likewise.
489
490 2004-07-02  Raja R Harinath  <rharinath@novell.com>
491
492         * Makefile (LIBRARY_USE_INTERMEDIATE_FILE): Define.
493         (LIBRARY_COMPILE): Simplify.
494
495 2004-06-24  Raja R Harinath  <rharinath@novell.com>
496
497         * Makefile (LIBRARY_COMPILE): Only define for W32.
498
499 2004-06-23 Gonzalo Paniagua Javier <gonzalo@ximian.com>
500
501         * Makefile: build using mcs on windows.
502
503 2004-06-19  Martin Baulig  <martin@ximian.com>
504
505         * MonoSymbolTable.cs
506         (SourceFileTable.Namespaces): New public property.
507
508 2004-06-02  Martin Baulig  <martin@ximian.com>
509
510         Set version number to 37.
511
512 2004-05-23 Ben Maurer  <bmaurer@users.sourceforge.net>
513
514         * MonoSymbolTable.cs (BuildLineNumberTable): Avoid arraylist.
515
516 2004-01-16  Martin Baulig  <martin@ximian.com>
517
518         Set version number to 36.
519
520         * MonoSymbolFile.cs (MonoSymbolFile): Removed 'FindMethod' and
521         'MethodLookup'.
522
523         * MonoSymbolTable.cs (MethodEntry): Don't write the method's full
524         name into the symbol file.
525
526 2004-01-16  Martin Baulig  <martin@ximian.com>
527
528         * MonoSymbolFile.cs (MonoDebuggerSupport): As suggested by Ben
529         Maurer, create a delegate type for each of the methods and then
530         store the method.
531
532 2004-01-15  Martin Baulig  <martin@ximian.com>
533
534         * MonoSymbolFile.cs (MonoDebuggerSupport): New public class
535         containing static wrappers for calling the `MonoDebugger_*'
536         function in S.R.Assembly.
537
538 2004-01-13  Martin Baulig  <martin@ximian.com>
539
540         * MonoSymbolTable.cs: Added more #region's and a comment at the
541         top of the file.
542
543         * MonoSymbolWriter.cs (SourceMethod.BuildLineNumberTable): Removed
544         it here since it's in MethodEntry again.
545
546 2004-01-13  Martin Baulig  <martin@ximian.com>
547
548         * ChangeLog, MonoSymbolTable.cs: Reviewed Ben's patches.  For
549         those which are not ok, I'll add detailed comments to the source
550         code.   
551
552 2003-12-28 Ben Maurer  <bmaurer@users.sourceforge.net>
553
554         [Revision 1.41, not approved.  Martin]
555         * MonoSymbolTable.cs (MethodEntry): kill more
556         useless fields.
557
558 2003-12-28 Ben Maurer  <bmaurer@users.sourceforge.net>
559
560         [Revision 1.40, not approved.  Martin]
561         * MonoSymbolTable.cs (MethodEntry): Remove the
562         SourceFileIndex field, we already have the info.
563
564 2003-12-28 Ben Maurer  <bmaurer@users.sourceforge.net>
565
566         [Revision 1.39, approved.  Martin]
567         * MonoSymbolTable.cs: Don't make the MethodIndexEntry
568         part of the method entry class, because it just
569         takes up extra space.
570
571 2003-12-28 Ben Maurer  <bmaurer@users.sourceforge.net>
572
573         [Revisions 1.37 and 1.38; not approved.  Martin]
574         * MonoSymbolTable.cs (MethodEntry.BuildLineNumberTable): Removed.
575
576         * MonoSymbolTable.cs, MonoSymbolWriter.cs: Use
577         fewer arrays, dont use arraylists with structs.
578
579 2003-12-27 Ben Maurer  <bmaurer@users.sourceforge.net>
580
581         * MonoSymbolFile.cs: Much, much better string writing.
582
583 2003-12-20 Ben Maurer  <bmaurer@users.sourceforge.net>
584
585         [Revision 1.36, approved.  Martin]
586         * MonoSymbolTable.cs: Fewer StringBuilder allocs.
587
588 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
589
590         * MonoSymbolWriter.cs: Create ArrayLists only when needed.
591
592 2003-12-07 Ben Maurer  <bmaurer@users.sourceforge.net>
593
594         [Revision 1.35, approved.  Martin]
595         * MonoSymbolTable.cs: It is faster to do a linear search
596         than it is to make a hashtable. Even though the linear
597         search is O(n^2) while the hashtable is O(n), the allocation
598         cost for a hashtable is *very* high, especially when only
599         a few members will be added.
600
601 2003-09-06  Martin Baulig  <martin@ximian.com>
602
603         * MonoSymbolFile.cs: Removed debugging output.
604
605 2003-08-05  Martin Baulig  <martin@ximian.com>
606
607         * MonoSymbolTable.cs (MethodEntry.Index): New public field.
608
609 2003-06-27  Zoltan Varga  <vargaz@freemail.hu>
610
611         * MonoSymbolWriter.cs: Enable calling of DefineDocument multiple
612         times with the same URL.
613
614 2003-06-10  Zoltan Varga  <vargaz@freemail.hu>
615
616         * MonoSymbolFile.cs: Fix off-by-one error.
617
618 2003-03-22  Martin Baulig  <martin@ximian.com>
619
620         * MonoSymbolTable.cs (MethodEntry.LocalNamesAmbiguous): New public
621         field.  Specifies whether two local variables have the same name.
622
623 2003-03-13  Martin Baulig  <martin@ximian.com>
624
625         Added basic support for lexical scopes.  This is just to tell a
626         debugger that a local variable is only available in a specific
627         lexical scope and that another variable of the same name may exist
628         in another lexical scope.  See debugger/test/TestLexicalScope.cs
629         for examples.
630
631         * MonoSymbolTable.cs (LexicalScopeEntry): New class.
632         (LocalVariableEntry): Added `BlockIndex' field which specifies the
633         lexical scope of this variable.
634
635         * MonoSymbolWriter.cs (SourceBlock): Removed, we're now using
636         LexicalScopeEntry instead.
637
638 2003-02-22  Martin Baulig  <martin@ximian.com>
639
640         * MonoSymbolTable.cs: Incremented version number.
641
642 2003-02-22  Martin Baulig  <martin@ximian.com>
643
644         * MonoSymbolFile.cs (MonoSymbolFile.FindMethod): Fixed a bug.
645         (MonoSymbolFile.MethodLookup): New method.
646
647 2003-02-18  Martin Baulig  <martin@ximian.com>
648
649         * MonoSymbolFile.cs (MonoSymbolFile.GetMethod): Added overloaded
650         version which takes a MethodBase.
651
652 2003-02-18  Martin Baulig  <martin@ximian.com>
653
654         * MonoSymbolTable.cs (MethodIndexEntry): New public struct.
655
656         * MonoSymbolFile.cs (MonoSymbolFile.GetMethodByToken): New method.
657
658 2003-02-18  Martin Baulig  <martin@ximian.com>
659
660         * MonoSymbolFile.cs (MonoSymbolFile.Assembly): New public property.
661
662         * MonoSymbolTable.cs (MethodEntry.MethodBase): New public property.
663         (MethodEntry.LocalTypes): New public variable.
664
665 2003-02-18  Martin Baulig  <martin@ximian.com>
666
667         * MonoSymbolFile.cs (MethodEntry.ThisTypeIndex): Renamed to
668         ClassTypeIndex; provide this for all methods so we can get the
669         class of static methods.
670
671 2003-02-10  Nick Drochak  <ndrochak@gol.com>
672
673         * Mono.CSharp.Debugger.build: passing the /r using an 'arg' node works.
674         The <include> node wasn't getting to the compiler. This fixes build
675         breakage on cygwin.
676
677         * MonoSymbolFile.cs: Qualify which Min method. Fixes build breakage
678         on cygwin.
679
680 2003-02-09  Martin Baulig  <martin@ximian.com>
681
682         * MonoSymbolWriter.cs (MonoSymbolWriter.ctor): We don't need the
683         `mbuilder_array' anymore.
684
685 2003-02-09  Martin Baulig  <martin@ximian.com>
686
687         * MonoSymbolWriter.cs (SourceFile): Derive from SourceFileEntry.
688         (SourceBlock): We don't need source lines here.
689         (SourceMethod): We're always constructed with source info.
690
691         * MonoSymbolTable.cs: Added support for namespaces.
692         (NamespaceEntry): New struct.
693         (SourceFileEntry.DefineNamespace): New method.
694         (MethodEntry.BuildLineNumberTable): The table is already sorted,
695         so we don't need to do this here.
696
697 2003-02-09  Martin Baulig  <martin@ximian.com>
698
699         * IMonoSymbolWriter.cs: Ooops, I forgot to remove this.
700
701 2003-02-08  Martin Baulig  <martin@ximian.com>
702
703         * MonoSymbolDocumentWriter.cs: Removed.
704
705         * MonoSymbolWriter.cs (SourceFile): Implement ISymbolDocumentWriter.
706
707 2003-02-08  Martin Baulig  <martin@ximian.com>
708
709         * MonoSymbolFile.cs (GetMethodSource): New public method.
710         (FindMethod): Return the correct index.
711
712 2003-02-07  Martin Baulig  <martin@ximian.com>
713
714         * MonoSymbolFile.cs (Methods, Sources): New public properties.
715
716 2003-02-07  Martin Baulig  <martin@ximian.com>
717
718         * MonoSymbolFile.cs (MonoSymbolFile.ReadSymbolFile): New public
719         static method, returns null (without throwing an exception) if the
720         assembly doesn't have any debugging info.
721
722 2003-02-07  Martin Baulig  <martin@ximian.com>
723
724         * MonoSymbolWriter.cs (MonoSymbolWriter.Initialize): Removed the
725         custom initialization function.
726
727         * MonoSymbolTableWriter.cs: Removed; the code is now in
728         MonoSymbolFile.cs and MonoSymbolWriter.cs.
729
730 2003-02-07  Martin Baulig  <martin@ximian.com>
731
732         * MonoSymbolFile.cs: The symbol file is now a resource in the
733         assembly instead of a separate file.
734
735         * MonoSymbolTable.cs: Did a few more cleanups, sort the line
736         number table and remove duplicate line numbers.
737
738 2003-02-05  Martin Baulig  <martin@ximian.com>
739
740         Modified the symbol file format to speed up method looks by name
741         and cleaned this up a lot.
742
743         * MonoSymbolFile.cs: New public class.  This is now a public class
744         and writes and reads the symbol file.
745
746         * IMonoBinaryReader.cs: Removed.
747
748         * MonoSymbolTable.cs: Set version number to 29.
749
750 2003-01-17  Zoltan Varga  <vargaz@freemail.hu>
751
752         * MonoSymbolWriter.cs (OpenMethod): Make it work on constructors.
753
754 2002-10-13  Martin Baulig  <martin@gnome.org>
755
756         * MonoSymbolTable.cs: Set version number to 28.
757         (SourceFileEntry): Read the methods when they're needed.
758         (MethodSourceEntry): Made this a struct, not a class.
759
760 2002-10-13  Martin Baulig  <martin@gnome.org>
761
762         * MonoSymbolTable.cs: Set version number to 27.  Added a source
763         file table which is used to search a method by source file + line number.
764
765 2002-09-21  Martin Baulig  <martin@gnome.org>
766
767         * MonoSymbolTable.cs: Set version number to 26.  Removed all the dynamic
768         stuff, this library now just deals with the compiler generated symbol table.
769         The dynamic stuff is private between the JIT and the debugger.
770
771 2002-09-21  Martin Baulig  <martin@gnome.org>
772
773         * MonoSymbolTable.cs: Set version number to 25.  Added information about
774         local variables.
775
776 2002-09-20  Martin Baulig  <martin@gnome.org>
777
778         * MonoSymbolTable.cs: Set version number to 24.  Added a type index
779         table.  Write the type of a local variable or a parameter as an index
780         into this table.
781
782 2002-09-20  Martin Baulig  <martin@gnome.org>
783
784         * IMonoSymbolWriter.cs: Remove all the unused interfaces.
785
786 2002-09-20  Martin Baulig  <martin@gnome.org>
787
788         * MonoSymbolTable.cs: Set version number to 23, include the size
789         of a variable.
790
791 2002-09-20  Martin Baulig  <martin@gnome.org>
792
793         * MonoSymbolTable.cs: Set version number to 22.  Provide information
794         about parameters and local variables.
795
796 2002-09-20  Martin Baulig  <martin@gnome.org>
797
798         * IMonoSymbolWriter.cs: Use fullly qualified name for
799         System.Diagnostics.SymbolStore.ISymbolWriter rather than `using' this
800         namespace.  This allows us to use the name `ISymbolWriter' in our own
801         code.
802
803 2002-09-18  Martin Baulig  <martin@gnome.org>
804
805         * MonoSymbolTable.cs: Set version number to 21.  Encode the source file
806         as a 4-byte length field followed by the UTF8 encoded string.
807
808 2002-09-18  Martin Baulig  <martin@gnome.org>
809
810         * IMonoBinaryReader.cs: New interface.
811
812         * MonoSymbolTable.cs: Use IMonoBinaryReader instead of binary reader.
813
814 2002-09-16  Martin Baulig  <martin@gnome.org>
815
816         * MonoSymbolTable.cs: Set version number to 20.
817
818 2002-09-14  Martin Baulig  <martin@gnome.org>
819
820         * MonoSymbolWriter.cs, IMonoSymbolWriter.cs, MonoSymbolTableWriter.cs:
821         Make all classes and interfaces which don't need to be public internal.
822
823 2002-09-14  Martin Baulig  <martin@gnome.org>
824
825         * MonoSymbolTable.cs: Use only CLS-compliant types here, bumped version
826         number to 19.
827
828         * MonoSymbolTableReader.cs: Removed, this is now in the debugger.
829
830 2002-09-03  Martin Baulig  <martin@gnome.org>
831
832         * AssemblerWriterI386.cs, IAssemblerWriter.cs, MonoDwarfFileWriter.cs,
833         README, README.relocation-table, csharp-lang.[ch], gdb-csharp-support.patch,
834         gdb-variable-scopes.patch: Removed.
835
836 2002-09-03  Martin Baulig  <martin@gnome.org>
837
838         * MonoSymbolTableReader.cs (MonoSymbolTableReader.ImageFile): New
839         public property.
840
841         * MonoSymbolTable.cs: Bumped version number to 18.
842
843 2002-08-27  Martin Baulig  <martin@gnome.org>
844
845         * MonoSymbolTable.cs (MethodAddress): Removed `TrampolineAddress'.
846
847 2002-08-27  Martin Baulig  <martin@gnome.org>
848
849         * MonoSymbolTable.cs: Changed the file format in a way that allows us
850         open it read-only and to use a specially malloced area for all the
851         dynamic data.   
852
853 2002-08-25  Martin Baulig  <martin@gnome.org>
854
855         * MonoSymbolTableReader.cs: New file.  This is the reader for the
856         new symbol file format.
857
858 2002-08-24  Martin Baulig  <martin@gnome.org>
859
860         * MonoSymbolTable.cs, MonoSymbolTableWriter.cs: New files.  This
861         creates a binary application.dbg file which will be used by the
862         JIT to display source lines for exceptions.
863
864         * list.unix: Disabled the dwarf file writer in the build.
865
866 2002-08-23  Martin Baulig  <martin@gnome.org>
867
868         * MonoSymbolWriter.cs (MonoSymbolWriter.Initialize): Added
869         assembly name argument.  Since the symbol writer needs to read the
870         final assembly, we need to give it its full pathname.
871
872 2002-08-23  Martin Baulig  <martin@gnome.org>
873
874         * makefile.gnu, list.unix: Added.
875
876 2002-07-05  Martin Baulig  <martin@gnome.org>
877
878         * MonoDwarfFileWriter.cs: Added support for types in referenced assemblies.
879
880 2002-07-05  Martin Baulig  <martin@gnome.org>
881
882         * MonoDwarfFileWriter.cs: Added support for arrays.
883
884         * gdb-csharp-support.patch: Updated.
885
886 2002-06-29  Martin Baulig  <martin@gnome.org>
887
888         * MonoDwarfFileWriter.cs (DieInheritance): Make this actually work.
889
890 2002-06-29  Martin Baulig  <martin@gnome.org>
891
892         * MonoDwarfFileWriter.cs, MonoSymbolWriter.cs: Put all TAG_subprogram's into their
893         corresponding struct/class declarations.
894
895 2002-06-28  Martin Baulig  <martin@gnome.org>
896
897         * gdb-csharp-support.patch: Updated.
898
899 2002-06-28  Martin Baulig  <martin@gnome.org>
900
901         * MonoDwarfFileWriter.cs: Use a TAG_string_type when we're using GNU extensions.
902         Make static struct/class fields actually work.  Provide a TAG_typedef for struct's
903         and classes.
904
905 2002-05-30  Martin Baulig  <martin@gnome.org>
906
907         * IMonoSymbolWriter (IMonoSymbolWriter): Added custom `Initialize' method.
908
909         * MonoSymbolWriter.cs (Initialize): The ISymbolWriter's `Initialize' method
910         is no longer supported and throws an exception.
911         (Initialize (string, string[])): New custom initialization function.
912
913         * MonoDwarfFileWriter.cs (DwarfFileWriter): Added `string[] args' argument
914         to the constructor to pass command line arguments.
915
916         * gdb-csharp-support.patch: Updated for GDB 5.2.
917
918 2002-05-30  Martin Baulig  <martin@gnome.org>
919
920         * MonoSymbolWriter.cs (MonoSymbolWriter): The constructor now get's the
921         AssemblyBuilder's `methods' array as third argument.
922         (OpenMethod): Use this array to get the method builder rather than using an
923         interncall for it.
924         (get_method_builder): Removed this interncall.
925
926 2002-05-25  Martin Baulig  <martin@gnome.org>
927
928         * MonoDwarfFileWriter.cs: Finished the type rewrite, put back strings and arrays.
929
930 2002-05-24  Martin Baulig  <martin@gnome.org>
931
932         * IMonoSymbolWriter.cs (ISourceMethod): Added `FullName' and `Parameters'.
933         (ITypeHandle): New interface.
934
935         * DwarfFileWriter.cs: Largely reorganized the type writing code.  Types are
936         now represented by ITypeHandle objects which are stored in a per-dwarf-writer
937         hash table.  At the moment, all types still need to be in one compile unit due
938         to lacking support in gdb - but this new type code here already supports this.
939
940         * MonoSymbolWriter.cs: Moved all the subclasses to the top-level and made them
941         public, cleaned up the code, put everything into one compile unit.
942         (DefineLocalVariable): Added a version of this function which takes useful args.
943
944 2002-05-22  Martin Baulig  <martin@gnome.org>
945
946         * IMonoSymbolWriter.cs (IMonoSymbolWriter): Added `Sources' and `Methods'
947         properties.
948
949         * MonoDwarfFileWriter.cs (WriteSymbolTable): New public method.  Moved the
950         code that writes the "mono_line_numbers" section here from the LineNumberEngine.
951
952 2002-05-22  Martin Baulig  <martin@gnome.org>
953
954         * IMonoSymbolWriter.cs (IVariable): Replaced Token with `ISourceMethod Method'.
955
956         * MonoSymbolWriter.cs (MonoSymbolWriter): The constructor now has an additional
957         ModuleBuilder argument.
958         (OpenMethod): Immediately call the `get_method' interncall to get the MethodBase
959         from the token, then store the MethodBase instead of the token.  The token may
960         still change during the metadata library's fixup process.
961         (DoFixups): When the image has been written to disk, call the GetToken () method
962         on all MethodBuilders and all ConstructorBuilders to get the final metadata tokens.
963
964 2002-05-22  Martin Baulig  <martin@gnome.org>
965
966         * AssemblerWriterI386.cs: Don't use GNU extensions and produce assembler
967         output which is free of comments and extra whitespaces so that it's suitable
968         for `as -f'.
969
970 2002-05-22  Martin Baulig  <martin@gnome.org>
971
972         * IMonoSymbolWriter.cs (ISourceMethod): Replaced `MethodInfo MethodInfo' with
973         `MethodBase MethodBase' and added `Type ReturnType'.  We're now correctly
974         dealing with constructors and not crashing anymore.
975
976 2002-05-21  Martin Baulig  <martin@gnome.org>
977
978         * MonoDwarfFileWriter.cs: Write a special line number table which can be read
979         in by the metadata library to get line number information in backtraces.
980
981 2002-05-06  Martin Baulig  <martin@gnome.org>
982
983         * MonoSymbolWriter.cs (MonoSymbolWriter.Close): Use Assembly.LoadFrom (), not
984         AppDomain.Load () to load the assembly.
985
986 2002-04-26  Martin Baulig  <martin@gnome.org>
987
988         * gdb-csharp-support.patch: A patch for GDB (against the latest CVS version)
989         to implement C# support.
990
991         * csharp-lang.c, csharp-lang.h, csharp-mono-lang.c: Copy these into your GDB
992         source directory after applying the patch.
993
994 2002-04-26  Martin Baulig  <martin@gnome.org>
995
996         * MonoDwarfFileWriter.cs (DieInternalString): Removed.
997
998 2002-04-25  Martin Baulig  <martin@gnome.org>
999
1000         * MonoDwarfFileWriter.cs: Reflect latest MonoString changes.
1001
1002 2002-04-13  Martin Baulig  <martin@gnome.org>
1003
1004         * IMonoSymbolWriter.cs (ISourceBlock): Added `Blocks' property and `AddBlock'
1005         method to support nested blocks.
1006
1007         * MonoSymbolWriter.cs: Correctly handle nested blocks.
1008
1009         * MonoDwarfFileWriter.cs (DieMember): Provide info for all fields, not just for
1010         public ones; also added DW_AT_accessibility.
1011         (DieVariable): Reflected latest debug-symfile.c changes.
1012
1013 2002-04-12  Martin Baulig  <martin@gnome.org>
1014
1015         * gdb-variable-scopes.patch: A patch for GDB (against the latest CVS version)
1016         to implement variable lifetimes.
1017
1018 2002-04-12  Martin Baulig  <martin@gnome.org>
1019
1020         * MonoDwarfFileWriter.cs (DieVariable): Provide info about the variable's
1021         lifetime using DW_AT_begin_scope and a new baulig extension DW_AT_end_scope.
1022
1023 2002-03-29  Martin Baulig  <martin@gnome.org>
1024
1025         * AssemblerWriterI386.cs: Rewrote most of the string output function, do the
1026         number->string conversion manually. It's now taking about 15 seconds to write
1027         a symbol file for MCS, no longer more than a minute.
1028
1029         * MonoDwarfFileWriter.cs: Added some profiling code, speeded things up, fixed
1030         a few bugs.
1031
1032 2002-03-25  Martin Baulig  <martin@gnome.org>
1033
1034         * MonoDwarfFileWriter.cs (CreateType): Return a `DieType'.
1035         (RegisterType): Add the type to the type hash before creating dependency types
1036         so we don't get recursion loops.
1037         (RegisterPointerType): New func to register a "pointer to type" type.
1038         (DieTypeDef, DiePointerType, DieArrayType, DieStringType, DieClassType): New
1039         types; added support for strings, arrays and basic support for classes.
1040         
1041 2002-03-24  Martin Baulig  <martin@gnome.org>
1042
1043         * IMonoSymbolWriter.cs: Killed all methods in this interface, no longer needed.
1044
1045         * MonoSymbolWriter.cs (MonoSymbolWriter): The constructor now takes a string
1046         argument which is the full pathname of the assembly - you must call Close()
1047         after the assembly has been written to disk since the symbol writer needs to
1048         load the finished assembly to get its metadata.
1049
1050         * MonoDwarfFileWriter.cs: Added support for enums and structs.
1051         
1052 2002-03-24  Martin Baulig  <martin@gnome.org>
1053
1054         * MonoDwarfFileWriter.cs: Added support for method parameters.
1055
1056 2002-03-24  Martin Baulig  <martin@gnome.org>
1057
1058         * IMonoSymbolWriter.cs (IMonoSymbolWriter): Removed my custom OpenMethod(),
1059         we're now using the ISymbolWriter's method.
1060         (IVariable): Added `byte[] Signature' property.
1061
1062         * MonoSymbolWriter.cs (SetAssembly): New method. This must be called before
1063         Close(); the assembly parameter is the already-written assembly, ie. it must
1064         contain the full metadata.
1065         (OpenMethod): Only take the token argument and set MethodInfo later in DoFixups.
1066         (SetMethodSourceRange): You must call this function to tell the symbol writer
1067         in which source file the method is defined.
1068         (DefineLocal): Store the signature in the local.
1069         (DoFixups): Use two new interncalls to set the SourceMethod's MethodInfo field
1070         and the LocalVariable's Type field.
1071
1072 2002-03-23  Martin Baulig  <martin@gnome.org>
1073
1074         * IMonoSymbolWriter.cs (ISourceBlock): New interface.
1075         (ILocalVariable): Renamed this interface to IVariable.
1076         (IVariable): Added Line, Type, Token.
1077         (ILocalVariable, IMethodParameter): New interfaces, derive from IVariable.
1078         (ISourceMethod): Added Blocks. Renamed FirstLine and LastLine to Start and End,
1079         changed their type to ISourceLine. Removed CodeSize.
1080         (ISourceLine): Renamed Line to Row, added Column. Added OffsetType and Offset.
1081
1082         * MonoDwarfFileWriter.cs (MonoDwarfFileWriter.DieLexicalBlock): New class.
1083         (MonoDwarfFileWriter.DieMethodVariable): New class.
1084
1085         * MonoSymbolWriter.cs (OpenScope, CloseScope): Implemented.
1086         Reflected latest IMonoSymbolWriter interface changes.
1087
1088 2002-03-20  Martin Baulig  <martin@gnome.org>
1089
1090         * IAssemblerWriter.cs: New interface.
1091
1092         * AssemblerWriterI386.cs: New class.
1093
1094         * MonoDwarfFileWriter.cs: Use the IAssemblerWriter interface to make this class
1095         platform and assembler independent.
1096
1097 2002-03-20  Martin Baulig  <martin@gnome.org>
1098
1099         * IMonoSymbolWriter.cs (ISourceMethod): Added FirstLine, LastLine, CodeSize and
1100         Token properties.
1101
1102         * MonoDwarfFileWriter.cs: Implemented line number support.
1103
1104 2002-03-19  Martin Baulig  <martin@gnome.org>
1105
1106         * IMonoSymbolWriter.cs (ISourceFile, ISourceMethod, ISourceLine, ILocalVariable):
1107         New interfaces.
1108
1109         * IMonoSymbolWriter.cs (OpenMethod): Take a System.Reflection.MethodInfo, not
1110         a string.
1111
1112 2002-03-19  Martin Baulig  <martin@gnome.org>
1113
1114         This is an implementation of the System.Diagnostics.SymbolStore.SymbolWriter
1115         interface. It's still work in progress and not yet used anywhere.
1116
1117         There is some preliminary documentation in the source files and some more
1118         docu in the README and README.relocation-table files.
1119
1120         * IMonoSymbolWriter.cs: New file.
1121         * MonoDwarfFileWriter.cs: New file.
1122         * MonoSymbolDocumentWriter.cs: New file.
1123         * MonoSymbolWriter.cs: New file.
1124
1125         * README, README.relocation-table: Documentation.
1126