Mono.Debugger.Backend.Mono.MonoThreadManager.Initialize C# (CSharp) Method

Initialize() public static method

public static Initialize ( Process process, Inferior inferior, TargetAddress info, bool attach ) : MonoThreadManager
process Process
inferior Inferior
info Mono.Debugger.TargetAddress
attach bool
return MonoThreadManager
        public static MonoThreadManager Initialize(Process process, Inferior inferior,
							    TargetAddress info, bool attach)
        {
            MonoDebuggerInfo debugger_info = MonoDebuggerInfo.Create (inferior, info);
            if (debugger_info == null)
                return null;

            if (attach) {
                if (!debugger_info.CheckRuntimeVersion (81, 2)) {
                    Report.Error ("The Mono runtime of the target application is too old to support attaching,\n" +
                              "attaching as a native application.");
                    return null;
                }

                if ((debugger_info.RuntimeFlags & 1) != 1) {
                    Report.Error ("The Mono runtime of the target application does not support attaching,\n" +
                              "attaching as a native application.");
                    return null;
                }
            }

            return new MonoThreadManager (process, inferior, debugger_info);
        }