Inheritance: Mono.Debugger.DebuggerMarshalByRefObject, IDisposable
コード例 #1
0
        PsErr global_lookup(string obj_name, string sym_name, out long sym_addr)
        {
            NativeExecutableReader exe = process.OperatingSystem.LookupLibrary(obj_name);

            if (exe == null)
            {
                sym_addr = 0;
                return(PsErr.NoSym);
            }

            TargetAddress addr = exe.LookupLocalSymbol(sym_name);

            if (addr.IsNull)
            {
                sym_addr = 0;
                return(PsErr.NoSym);
            }

            sym_addr = addr.Address;
            return(PsErr.Ok);
        }
コード例 #2
0
        protected TargetReader GetReader(TargetAddress address)
        {
            TargetReader reader = core_bfd.GetReader(address, true);

            if (reader != null)
            {
                return(reader);
            }

            NativeExecutableReader exe = NativeLanguage.OperatingSystem.LookupLibrary(address);

            if (exe != null)
            {
                reader = exe.GetReader(address);
                if (reader != null)
                {
                    return(reader);
                }
            }

            throw new TargetException(
                      TargetError.MemoryAccess, "Memory region containing {0} not in " +
                      "core file.", address);
        }
コード例 #3
0
ファイル: Inferior.cs プロジェクト: baulig/debugger
        protected void SetupInferior()
        {
            IntPtr data = IntPtr.Zero;
            try {
                check_error (mono_debugger_server_get_signal_info (
                             server_handle, out data));

                signal_info = (SignalInfo) Marshal.PtrToStructure (
                    data, typeof (SignalInfo));
                has_signals = true;
            } finally {
                g_free (data);
            }

            target_info = GetTargetMemoryInfo (address_domain);

            try {
                string cwd;
                string[] cmdline_args;

                string application = GetApplication (out cwd, out cmdline_args);

                exe = process.OperatingSystem.LoadExecutable (
                    target_info, application, start.LoadNativeSymbolTable);
            } catch (Exception e) {
                if (error_handler != null)
                    error_handler (this, String.Format (
                                   "Can't read symbol file {0}", start.TargetApplication), e);
                else
                    Console.WriteLine ("Can't read symbol file {0}: {1}",
                               start.TargetApplication, e);
                return;
            }

            arch = process.Architecture;
        }