Welcome to mirror list, hosted at ThFree Co, Russian Federation.

README « Mono.CSharp.Debugger « class « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4fb2043099f41ffc6b058e6a78d823f76293b863 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
This is an implementation of the System.Diagnostics.SymbolStore.ISymbolWriter
interface which writes a dwarf debugging information file.

Unfortunately there are several major problems with this interface and I'm
unsure how to solve them:

1.) The interface contains a constructor method `Initialize' which has an
    'IntPtr' emitter argument which seems to be a pointer to the actual
    symbol writer which resides in a proprietary, undocumented DLL (I spent
    almost 3 hours browsing the ".NET Framework SDK Documentation" and
    msdn.microsoft.com - without success.

    A short test showed me that mscorlib doesn't like passing zero, this
    won't give you the system's default implementation.

    To solve this problem, I created a derived interface IMonoSymbolWriter
    which contains an additional constructor which only takes the name of
    the symbol file as argument.

        void Initialize (string filename);

2.) You seem to get an instance of a class implementing this interface by
    creating a new instance of System.Reflection.Emit.ModuleBuilder (with the
    `bool createSymbolFile' argument) and then calling GetSymWriter() on
    the returned object.

    So far so good, but how does this method find out which symbol writer
    to use ?

3.) According to the documentation, some of the methods of
    System.Reflection.Emit.ILGenerator and System.Reflection.Emit.LocalBuilder
    seem to use the symbol writer to emit symbol debugging information.

    But again, how do these objects get the symbol writer ?

Currently, there are two ways to use this assembly:

a.) Fix the problems outlined above and dynamically load this assembly
    (Mono.CSharp.Debugger.dll) when a new symbol writer is created.

b.) Reference this assembly in your application and manually create the
    symbol writer using the constructor.