projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b49d219
)
Add Mono.Runtime::GetNativeStackTrace method to make the new backtracing facility...
author
Rodrigo Kumpera
<kumpera@gmail.com>
Fri, 20 Jul 2012 16:20:16 +0000
(13:20 -0300)
committer
Rodrigo Kumpera
<kumpera@gmail.com>
Fri, 20 Jul 2012 16:23:28 +0000
(13:23 -0300)
mcs/class/corlib/Mono/Runtime.cs
patch
|
blob
|
history
mono/metadata/exception.c
patch
|
blob
|
history
mono/metadata/icall-def.h
patch
|
blob
|
history
mono/metadata/object-internals.h
patch
|
blob
|
history
diff --git
a/mcs/class/corlib/Mono/Runtime.cs
b/mcs/class/corlib/Mono/Runtime.cs
index 9636fb1bda3ad123e3c4b73a611db16564ae8b25..b036daba679dddb14a94bdb347b15cd51f5cd73a 100644
(file)
--- a/
mcs/class/corlib/Mono/Runtime.cs
+++ b/
mcs/class/corlib/Mono/Runtime.cs
@@
-47,6
+47,10
@@
namespace Mono {
// Format is undefined only for use as a string for reporting
[MethodImplAttribute (MethodImplOptions.InternalCall)]
internal static extern string GetDisplayName ();
// Format is undefined only for use as a string for reporting
[MethodImplAttribute (MethodImplOptions.InternalCall)]
internal static extern string GetDisplayName ();
+
+ [MethodImplAttribute (MethodImplOptions.InternalCall)]
+ public static extern string GetNativeStackTrace (Exception exception);
+
}
}
}
}
diff --git
a/mono/metadata/exception.c
b/mono/metadata/exception.c
index e3ba90d69d77acec5f6198c6e0f490b582088828..f120041e2d255cd8eb735b76f8cd803add86a46f 100644
(file)
--- a/
mono/metadata/exception.c
+++ b/
mono/metadata/exception.c
@@
-803,3
+803,16
@@
mono_exception_get_native_backtrace (MonoException *exc)
#endif
}
#endif
}
+MonoString *
+ves_icall_Mono_Runtime_GetNativeStackTrace (MonoException *exc)
+{
+ char *trace;
+ MonoString *res;
+ if (!exc)
+ mono_raise_exception (mono_get_exception_argument_null ("exception"));
+
+ trace = mono_exception_get_native_backtrace (exc);
+ res = mono_string_new (mono_domain_get (), trace);
+ g_free (trace);
+ return res;
+}
diff --git
a/mono/metadata/icall-def.h
b/mono/metadata/icall-def.h
index 3939a9a2f258d099e9199368671648097ae4d315..b4667d71f4689788b30ef8f4ba373630d2a79aa4 100644
(file)
--- a/
mono/metadata/icall-def.h
+++ b/
mono/metadata/icall-def.h
@@
-47,6
+47,7
@@
ICALL(COMPROX_2, "FindProxy", ves_icall_Mono_Interop_ComInteropProxy_FindProxy)
ICALL_TYPE(RUNTIME, "Mono.Runtime", RUNTIME_1)
ICALL(RUNTIME_1, "GetDisplayName", ves_icall_Mono_Runtime_GetDisplayName)
ICALL_TYPE(RUNTIME, "Mono.Runtime", RUNTIME_1)
ICALL(RUNTIME_1, "GetDisplayName", ves_icall_Mono_Runtime_GetDisplayName)
+ICALL(RUNTIME_12, "GetNativeStackTrace", ves_icall_Mono_Runtime_GetNativeStackTrace)
#ifndef PLATFORM_RO_FS
ICALL_TYPE(KPAIR, "Mono.Security.Cryptography.KeyPairPersistence", KPAIR_1)
#ifndef PLATFORM_RO_FS
ICALL_TYPE(KPAIR, "Mono.Security.Cryptography.KeyPairPersistence", KPAIR_1)
diff --git
a/mono/metadata/object-internals.h
b/mono/metadata/object-internals.h
index 0f8981c8c7958a9bfd5b0429ad1fafda9497a485..3a455158cd5821fd152e917c532869885968c7ee 100644
(file)
--- a/
mono/metadata/object-internals.h
+++ b/
mono/metadata/object-internals.h
@@
-1577,6
+1577,9
@@
mono_monitor_is_il_fastpath_wrapper (MonoMethod *method) MONO_INTERNAL;
char *
mono_exception_get_native_backtrace (MonoException *exc) MONO_INTERNAL;
char *
mono_exception_get_native_backtrace (MonoException *exc) MONO_INTERNAL;
+MonoString *
+ves_icall_Mono_Runtime_GetNativeStackTrace (MonoException *exc) MONO_INTERNAL;
+
#endif /* __MONO_OBJECT_INTERNALS_H__ */
#endif /* __MONO_OBJECT_INTERNALS_H__ */