You've already forked linux-packaging-mono
Imported Upstream version 5.18.0.248
Former-commit-id: 738e3044ff639637d8fe2511a8b60b065577838e
This commit is contained in:
parent
ce8e504569
commit
2393d5688b
@@ -204,16 +204,43 @@ namespace Mono {
|
||||
}
|
||||
}
|
||||
|
||||
enum CrashReportLogLevel : int {
|
||||
MonoSummaryNone = 0,
|
||||
MonoSummarySetup,
|
||||
MonoSummarySuspendHandshake,
|
||||
MonoSummaryUnmanagedStacks,
|
||||
MonoSummaryManagedStacks,
|
||||
MonoSummaryStateWriter,
|
||||
MonoSummaryStateWriterDone,
|
||||
MonoSummaryMerpWriter,
|
||||
MonoSummaryMerpInvoke,
|
||||
MonoSummaryCleanup,
|
||||
MonoSummaryDone,
|
||||
|
||||
MonoSummaryDoubleFault
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
static extern int CheckCrashReportLog_internal (IntPtr directory, bool clear);
|
||||
|
||||
static int CheckCrashReportLog (string directory_str, bool clear)
|
||||
static CrashReportLogLevel CheckCrashReportLog (string directory_str, bool clear)
|
||||
{
|
||||
using (var directory_chars = RuntimeMarshal.MarshalString (directory_str))
|
||||
{
|
||||
return CheckCrashReportLog_internal (directory_chars.Value, clear);
|
||||
return (CrashReportLogLevel) CheckCrashReportLog_internal (directory_chars.Value, clear);
|
||||
}
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
static extern void AnnotateMicrosoftTelemetry_internal (IntPtr key, IntPtr val);
|
||||
|
||||
static void AnnotateMicrosoftTelemetry (string key, string val)
|
||||
{
|
||||
using (var key_chars = RuntimeMarshal.MarshalString (key))
|
||||
using (var val_chars = RuntimeMarshal.MarshalString (val))
|
||||
{
|
||||
AnnotateMicrosoftTelemetry_internal (key_chars.Value, val_chars.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -525,9 +525,10 @@ namespace MonoTests.System
|
||||
{
|
||||
var monoType = Type.GetType ("Mono.Runtime", false);
|
||||
var convert = monoType.GetMethod("CheckCrashReportLog", BindingFlags.NonPublic | BindingFlags.Static);
|
||||
var result = (int) convert.Invoke(null, new object[] { "./", true });
|
||||
var monoSummaryDone = 8;
|
||||
Assert.AreEqual (monoSummaryDone, result, "#DLC1");
|
||||
var result = convert.Invoke(null, new object[] { "./", true });
|
||||
var enumType = monoType.Assembly.GetType("Mono.Runtime+CrashReportLogLevel");
|
||||
var doneEnum = Enum.Parse(enumType, "MonoSummaryDone");
|
||||
Assert.AreEqual (doneEnum, result, "#DLC1");
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
Reference in New Issue
Block a user