diff options
author | Rodrigo Kumpera <kumpera@gmail.com> | 2013-02-05 02:38:48 +0400 |
---|---|---|
committer | Rodrigo Kumpera <kumpera@gmail.com> | 2013-02-05 04:18:06 +0400 |
commit | e2e35b4f2c1a8aacccd1a8fbc38dcd10122412fe (patch) | |
tree | 3dfff0e53e889fcf136b6a4c415373cf3776583e /mcs/class/Mono.CompilerServices.SymbolWriter | |
parent | 0e6393ec6c771b8c89955dee6aed49ed8d9aa0ef (diff) |
Expose some Mono.CompilerServices.SymbolWriter internal APIs so it's possible to build a mdb file from another one.
Diffstat (limited to 'mcs/class/Mono.CompilerServices.SymbolWriter')
-rw-r--r-- | mcs/class/Mono.CompilerServices.SymbolWriter/MonoSymbolFile.cs | 8 | ||||
-rw-r--r-- | mcs/class/Mono.CompilerServices.SymbolWriter/MonoSymbolTable.cs | 15 |
2 files changed, 19 insertions, 4 deletions
diff --git a/mcs/class/Mono.CompilerServices.SymbolWriter/MonoSymbolFile.cs b/mcs/class/Mono.CompilerServices.SymbolWriter/MonoSymbolFile.cs index 9b83bf3bed9..8431c70a454 100644 --- a/mcs/class/Mono.CompilerServices.SymbolWriter/MonoSymbolFile.cs +++ b/mcs/class/Mono.CompilerServices.SymbolWriter/MonoSymbolFile.cs @@ -130,24 +130,24 @@ namespace Mono.CompilerServices.SymbolWriter public int NumLineNumbers; - internal MonoSymbolFile () + public MonoSymbolFile () { ot = new OffsetTable (); } - internal int AddSource (SourceFileEntry source) + public int AddSource (SourceFileEntry source) { sources.Add (source); return sources.Count; } - internal int AddCompileUnit (CompileUnitEntry entry) + public int AddCompileUnit (CompileUnitEntry entry) { comp_units.Add (entry); return comp_units.Count; } - internal void AddMethod (MethodEntry entry) + public void AddMethod (MethodEntry entry) { methods.Add (entry); } diff --git a/mcs/class/Mono.CompilerServices.SymbolWriter/MonoSymbolTable.cs b/mcs/class/Mono.CompilerServices.SymbolWriter/MonoSymbolTable.cs index 88d604f2e36..2b434426803 100644 --- a/mcs/class/Mono.CompilerServices.SymbolWriter/MonoSymbolTable.cs +++ b/mcs/class/Mono.CompilerServices.SymbolWriter/MonoSymbolTable.cs @@ -601,6 +601,11 @@ namespace Mono.CompilerServices.SymbolWriter DataOffset = reader.ReadInt32 (); } + public void ReadAll () + { + ReadData (); + } + void ReadData () { if (creating) @@ -746,6 +751,7 @@ namespace Mono.CompilerServices.SymbolWriter public string FileName { get { return file_name; } + set { file_name = value; } } public bool AutoGenerated { @@ -1208,6 +1214,15 @@ namespace Mono.CompilerServices.SymbolWriter bw.WriteLeb128 ((int) flags); } + public void ReadAll () + { + GetLineNumberTable (); + GetLocals (); + GetCodeBlocks (); + GetScopeVariables (); + GetRealName (); + } + public LineNumberTable GetLineNumberTable () { lock (SymbolFile) { |