This is so that the tool can work independently of runtime assembly resolution (ie. to load alternate corlibs)
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
-using System.Text;
-using System.Reflection;
-
namespace System.Diagnostics {
+ using System.Text;
+#if INSIDE_CORLIB
+ using System.Reflection;
+#else
+ using IKVM.Reflection;
+ using IKVM.Reflection.Reader;
+ using Type = IKVM.Reflection.Type;
+#endif
// This class exists so tools such as mono-symbolicate can use it directly.
class StackTraceHelper {
if (pt.IsGenericType && ! pt.IsGenericTypeDefinition)
pt = pt.GetGenericTypeDefinition ();
- if (pt.IsClass && !String.IsNullOrEmpty (pt.Namespace)) {
- sb.Append (pt.Namespace);
- sb.Append (".");
- }
- sb.Append (pt.Name);
+ sb.Append (pt.ToString());
+
if (p [i].Name != null) {
sb.Append (" ");
sb.Append (p [i].Name);
using System.IO;
using System.Linq;
using System.Text;
-using System.Reflection;
+using IKVM.Reflection;
using System.Diagnostics;
using System.Collections.Generic;
using Mono.Cecil;
}
}
+ static readonly Universe ikvm_reflection = new Universe ();
Dictionary<string, AssemblyLocationProvider> assemblies;
HashSet<string> directories;
if (!File.Exists (assemblyPath))
throw new ArgumentException ("assemblyPath does not exist: "+ assemblyPath);
- var assembly = Assembly.ReflectionOnlyLoadFrom (assemblyPath);
+ var assembly = ikvm_reflection.LoadFile (assemblyPath);
MonoSymbolFile symbolFile = null;
var symbolPath = assemblyPath + ".mdb";
if (!File.Exists (symbolPath))
Debug.WriteLine (".mdb file was not found for " + assemblyPath);
else
- symbolFile = MonoSymbolFile.ReadSymbolFile (assemblyPath + ".mdb");
+ symbolFile = MonoSymbolFile.ReadSymbolFile (symbolPath);
var seqPointDataPath = assemblyPath + ".msym";
if (!File.Exists (seqPointDataPath))
PROGRAM = mono-symbolicate.exe
-LOCAL_MCS_FLAGS =
+LOCAL_MCS_FLAGS = \
+ /D:NO_AUTHENTICODE
LIB_REFS = Mono.Cecil Mono.CompilerServices.SymbolWriter System.Xml System.Core System
at StackTraceDumper.Catch (System.Action action) in StackTraceDumper.cs:54
System.Exception: Stacktrace with 3 frames
- at StackTraceDumper.ThrowException (System.String message, Int32 i) in StackTraceDumper.cs:78
+ at StackTraceDumper.ThrowException (System.String message, System.Int32 i) in StackTraceDumper.cs:78
at StackTraceDumper.<Main>m__1 () in StackTraceDumper.cs:18
at StackTraceDumper.Catch (System.Action action) in StackTraceDumper.cs:54
Stacktrace:
- at StackTraceDumper.ThrowException (System.String message, Int32 i) in StackTraceDumper.cs:78
+ at StackTraceDumper.ThrowException (System.String message, System.Int32 i) in StackTraceDumper.cs:78
at StackTraceDumper.<Main>m__1 () in StackTraceDumper.cs:18
at StackTraceDumper.Catch (System.Action action) in StackTraceDumper.cs:54
System.Exception: Stacktrace with 4 frames
- at StackTraceDumper.ThrowException (System.String message, Int32 i) in StackTraceDumper.cs:78
- at StackTraceDumper.ThrowException (System.String message, Int32 i) in StackTraceDumper.cs:76
+ at StackTraceDumper.ThrowException (System.String message, System.Int32 i) in StackTraceDumper.cs:78
+ at StackTraceDumper.ThrowException (System.String message, System.Int32 i) in StackTraceDumper.cs:76
at StackTraceDumper.<Main>m__2 () in StackTraceDumper.cs:20
at StackTraceDumper.Catch (System.Action action) in StackTraceDumper.cs:54
Stacktrace:
- at StackTraceDumper.ThrowException (System.String message, Int32 i) in StackTraceDumper.cs:78
- at StackTraceDumper.ThrowException (System.String message, Int32 i) in StackTraceDumper.cs:76
+ at StackTraceDumper.ThrowException (System.String message, System.Int32 i) in StackTraceDumper.cs:78
+ at StackTraceDumper.ThrowException (System.String message, System.Int32 i) in StackTraceDumper.cs:76
at StackTraceDumper.<Main>m__2 () in StackTraceDumper.cs:20
at StackTraceDumper.Catch (System.Action action) in StackTraceDumper.cs:54
LocationProvider.cs
SeqPointInfo.cs
../../class/corlib/System.Diagnostics/StackTraceHelper.cs
+../../../external/ikvm/reflect/*.cs
+../../../external/ikvm/reflect/Impl/*.cs
+../../../external/ikvm/reflect/Emit/*.cs
+../../../external/ikvm/reflect/Metadata/*.cs
+../../../external/ikvm/reflect/Reader/*.cs
+../../../external/ikvm/reflect/Writer/*.cs