示例#1
0
        public Debugger(Machine machine, ELFSharp.IELF elf)
        {
            Machine = machine;
            Elf     = elf as ELFSharp.ELF <uint>;

            if (elf != null)
            {
                var symtab = elf.GetSection(".symtab") as ELFSharp.SymbolTable <uint>;

                MethodSymbols = symtab.Entries.Where(e => e.Type == ELFSharp.SymbolType.Function).ToDictionary(e => e.Name, e => e.Value);
            }
        }
示例#2
0
        public DebugForm(Machine machine, ELFSharp.IELF elf)
        {
            InitializeComponent();

            Debugger = new MIPS.Architecture.Debugger(machine, elf);

            // Add event handlers
            Debugger.Machine.CPU.CPUStep       += new EventHandler(CPU_CPUStep);
            Debugger.Machine.CPU.BreakpointHit += new EventHandler(CPU_BreakpointHit);
            Debugger.Machine.CPU.BreakpointHit += new EventHandler(CPU_CPUStep);
            Debugger.Machine.CPU.Paused        += new EventHandler(CPU_CPUStep);
            Debugger.Machine.CPU.Syscall       += new EventHandler(CPU_Syscall);

            UpdateDebugInfo();

            KeyPreview = true;
        }