Beispiel #1
0
        static unsafe void AssemblyName_nInit(byte *obj, out TysosAssembly assembly, bool forIntrospection, bool raiseResolveEvent)
        {
            string name = CastOperations.ReinterpretAsString(*(void **)(obj + ClassOperations.GetFieldOffset("_ZW19System#2EReflection12AssemblyName", "_Name")));

            System.Diagnostics.Debugger.Log(0, "libsupcs", "AssemblyName_nInit(" + name + ", out TysosAssembly, bool, bool) called");

            // split assembly name off from other fields
            int    comma = name.IndexOf(',');
            string Name;

            if (comma != -1)
            {
                Name = name.Substring(0, comma);
            }
            else
            {
                Name = name;
            }

            if (Name.Equals("System.Private.CoreLib"))
            {
                Name = "mscorlib";
            }

            *(void **)(obj + ClassOperations.GetFieldOffset("_ZW19System#2EReflection12AssemblyName", "_Name")) =
                CastOperations.ReinterpretAsPointer(Name);

            System.Diagnostics.Debugger.Log(0, "libsupcs", "AssemblyName_nInit - setting _Name to " + Name);

            assembly = null;
        }
Beispiel #2
0
 internal static unsafe void StackTrace_GetStackFramesInternal(void *sfh, int iSkip, bool fNeedFileInfo, Exception e)
 {
     /* We set the 'reentrant' member of the stack frame helper here to prevent InitializeSourceInfo running further and set
      * iFrameCount to zero to prevent stack traces occuring via CoreCLR */
     *(int *)((byte *)OtherOperations.GetStaticObjectAddress("_ZW20System#2EDiagnostics16StackFrameHelperS")
              + ClassOperations.GetStaticFieldOffset("_ZW20System#2EDiagnostics16StackFrameHelper", "t_reentrancy"))      = 1;
     *(int *)((byte *)sfh + ClassOperations.GetFieldOffset("_ZW20System#2EDiagnostics16StackFrameHelper", "iFrameCount")) = 0;
 }