This class is the managed representation of the MONO_DEBUGGER__debugger_info struct. as defined in mono/mini/debug-debugger.h
Example #1
0
        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));
        }
Example #2
0
        protected CoreFile(ThreadManager manager, ProcessStart start)
            : base(manager, start)
        {
            info = Inferior.GetTargetMemoryInfo (manager.AddressDomain);

            bfd = (Bfd) NativeLanguage.OperatingSystem.LoadExecutable (
                info, start.TargetApplication, true);

            core_file = start.CoreFile;

            core_bfd = bfd.OpenCoreFile (core_file);

            #if FIXME
            string crash_program = core_bfd.CrashProgram;
            string[] crash_program_args = crash_program.Split (' ');

            if (crash_program_args [0] != application)
                throw new TargetException (
                    TargetError.CannotStartTarget,
                    "Core file (generated from {0}) doesn't match executable {1}.",
                    crash_program, application);

            bool ok;
            try {
                DateTime core_date = Directory.GetLastWriteTime (core_file);
                DateTime app_date = Directory.GetLastWriteTime (application);

                ok = app_date < core_date;
            } catch {
                ok = false;
            }

            if (!ok)
                throw new TargetException (
                    TargetError.CannotStartTarget,
                    "Executable {0} is more recent than core file {1}.",
                    application, core_file);
            #endif

            read_note_section ();
            main_thread = (CoreFileThread) threads [0];

            TargetMemoryAccess target_access = ((CoreFileThread) threads [0]).TargetAccess;
            // bfd.UpdateSharedLibraryInfo (null, target_access);

            TargetAddress mdb_debug_info = bfd.GetSectionAddress (".mdb_debug_info");
            if (!mdb_debug_info.IsNull) {
                mdb_debug_info = main_thread.ReadAddress (mdb_debug_info);
                debugger_info = MonoDebuggerInfo.Create (target_access, mdb_debug_info);
                read_thread_table ();
                CreateMonoLanguage (debugger_info);
                mono_language.InitializeCoreFile (target_access);
                mono_language.Update (target_access);
            }
        }
Example #3
0
        protected MonoThreadManager(Process process, Inferior inferior,
                                    MonoDebuggerInfo debugger_info)
        {
            this.process       = process;
            this.debugger_info = debugger_info;

            inferior.WriteInteger(debugger_info.UsingMonoDebugger, 1);

            notification_bpt = new InitializeBreakpoint(this, debugger_info.Initialize);
            notification_bpt.Insert(inferior);
        }
Example #4
0
 internal MonoLanguageBackend CreateMonoLanguage(MonoDebuggerInfo info)
 {
     mono_language = new MonoLanguageBackend (this, info);
     return mono_language;
 }
Example #5
0
        protected MonoThreadManager(Process process, Inferior inferior,
					     MonoDebuggerInfo debugger_info)
        {
            this.process = process;
            this.debugger_info = debugger_info;

            inferior.WriteInteger (debugger_info.UsingMonoDebugger, 1);

            notification_bpt = new InitializeBreakpoint (this, debugger_info.Initialize);
            notification_bpt.Insert (inferior);
        }
Example #6
0
        public static MetadataHelper Create(TargetMemoryAccess memory, MonoDebuggerInfo info)
        {
            MetadataInfo metadata = new MetadataInfo(memory, info.MonoMetadataInfo);

            return(new MetadataHelper(info, metadata));
        }
Example #7
0
 protected MetadataHelper(MonoDebuggerInfo info, MetadataInfo metadata)
 {
     this.MonoDebuggerInfo = info;
     this.MonoMetadataInfo = metadata;
 }
 public MonoLanguageBackend(Process process, MonoDebuggerInfo info)
 {
     this.process = process;
     this.info = info;
     data_tables = new Hashtable ();
 }
Example #9
0
 public static MetadataHelper Create(TargetMemoryAccess memory, MonoDebuggerInfo info)
 {
     MetadataInfo metadata = new MetadataInfo (memory, info.MonoMetadataInfo);
     return new MetadataHelper (info, metadata);
 }
Example #10
0
 protected MetadataHelper(MonoDebuggerInfo info, MetadataInfo metadata)
 {
     this.MonoDebuggerInfo = info;
     this.MonoMetadataInfo = metadata;
 }