1 This is an implementation of the System.Diagnostics.SymbolStore.ISymbolWriter
2 interface which writes a dwarf debugging information file.
4 Unfortunately there are several major problems with this interface and I'm
5 unsure how to solve them:
7 1.) The interface contains a constructor method `Initialize' which has an
8 'IntPtr' emitter argument which seems to be a pointer to the actual
9 symbol writer which resides in a proprietary, undocumented DLL (I spent
10 almost 3 hours browsing the ".NET Framework SDK Documentation" and
11 msdn.microsoft.com - without success.
13 A short test showed me that mscorlib doesn't like passing zero, this
14 won't give you the system's default implementation.
16 To solve this problem, I created a derived interface IMonoSymbolWriter
17 which contains an additional constructor which only takes the name of
18 the symbol file as argument.
20 void Initialize (string filename);
22 2.) You seem to get an instance of a class implementing this interface by
23 creating a new instance of System.Reflection.Emit.ModuleBuilder (with the
24 `bool createSymbolFile' argument) and then calling GetSymWriter() on
27 So far so good, but how does this method find out which symbol writer
30 3.) According to the documentation, some of the methods of
31 System.Reflection.Emit.ILGenerator and System.Reflection.Emit.LocalBuilder
32 seem to use the symbol writer to emit symbol debugging information.
34 But again, how do these objects get the symbol writer ?
36 Currently, there are two ways to use this assembly:
38 a.) Fix the problems outlined above and dynamically load this assembly
39 (Mono.CSharp.Debugger.dll) when a new symbol writer is created.
41 b.) Reference this assembly in your application and manually create the
42 symbol writer using the constructor.