상속: 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;
        }