void gtk_debugger_display(void) { WND_TMR_START(); // display debugger windows (if not) if(options3.dbg_dock) { dbgdock_display_window(); dbgiop_display_window(); dbgpclog_display_window(); } else { dbgregs_display_window(); dbgmem_display_window(); dbgbkpts_display_window(); dbgpclog_display_window(); dbgstack_display_window(); dbgheap_display_window(); dbgiop_display_window(); dbgcode_display_window(); // the last has focus } WND_TMR_STOP("Display Time"); }
// show previously created window int gtk_debugger_enter(int context) { #ifndef NO_GDB gint type, id, mode; if (!dbg_on) gdbtk_show_insight(); #endif // debugger is open dbg_on = !0; // show breakpoint source (modal) switch(context) { case DBG_TRACE: break; case DBG_BREAK: break; } // display debugger windows (if not) dbgregs_display_window(); dbgmem_display_window(); dbgbkpts_display_window(); dbgpclog_display_window(); dbgstack_display_window(); dbgheap_display_window(); dbgiop_display_window(); dbgcode_display_window(); // the last has focus // enable the debugger if GDB disabled it if (!GTK_WIDGET_SENSITIVE(dbgw.regs)) set_other_windows_sensitivity(TRUE); // handle automatic debugging requests #ifndef NO_GDB if (symfile) { // get context ti68k_bkpt_get_cause(&type, &mode, &id); if(type == BK_TYPE_PGMENTRY) { uint16_t handle; uint32_t pc; ti68k_bkpt_get_pgmentry(id, &handle); ti68k_bkpt_del_pgmentry(handle); if(GTK_WIDGET_VISIBLE(dbgw.bkpts)) dbgbkpts_refresh_window(); delete_command(NULL, 0); symbol_file_clear(0); gdbtk_clear_file (); ti68k_register_get_pc(&pc); gdb_add_symbol_file(symfile, pc); g_free (symfile); symfile = NULL; exec_build_section_table(); ti68k_unprotect_64KB_range(pc); gdb_hbreak("__main"); } } #endif return 0; }