// refresh content of all windows void gtk_debugger_refresh(void) { if(GTK_WIDGET_VISIBLE(dbgw.regs)) dbgregs_refresh_window(); if(GTK_WIDGET_VISIBLE(dbgw.mem)) dbgmem_refresh_window(); if(GTK_WIDGET_VISIBLE(dbgw.bkpts)) dbgbkpts_refresh_window(); if(GTK_WIDGET_VISIBLE(dbgw.pclog)) dbgpclog_refresh_window(); if(GTK_WIDGET_VISIBLE(dbgw.code)) dbgcode_refresh_window(); if(GTK_WIDGET_VISIBLE(dbgw.stack)) dbgstack_refresh_window(); if(GTK_WIDGET_VISIBLE(dbgw.heap)) dbgheap_refresh_window(); if(GTK_WIDGET_VISIBLE(dbgw.iop)) dbgiop_refresh_window(); }
gint dbgentry_display_dbox(void) { GladeXML *xml; GtkWidget *dbox; GtkWidget *data; gint result; xml = glade_xml_new (tilp_paths_build_glade("dbg_entry-2.glade"), "dbgentry_dbox", PACKAGE); if (!xml) g_error(_("%s: GUI loading failed!\n"), __FILE__); glade_xml_signal_autoconnect(xml); dbox = glade_xml_get_widget(xml, "dbgentry_dbox"); //gtk_window_resize(GTK_WINDOW(dbox), 320, 240); data = glade_xml_get_widget(xml, "treeview1"); ctree_create(data); ctree_populate(data); result = gtk_dialog_run(GTK_DIALOG(dbox)); switch (result) { case GTK_RESPONSE_OK: ctree_get_selection(); dbgbkpts_refresh_window(); break; default: break; } gtk_widget_destroy(dbox); return 0; }
void gtk_debugger_refresh(void) { WND_TMR_START(); if(options3.dbg_dock || GTK_WIDGET_VISIBLE(dbgw.regs)) dbgregs_refresh_window(); if(options3.dbg_dock || GTK_WIDGET_VISIBLE(dbgw.mem)) dbgmem_refresh_window(); if(options3.dbg_dock || GTK_WIDGET_VISIBLE(dbgw.bkpts)) dbgbkpts_refresh_window(); if(options3.dbg_dock || GTK_WIDGET_VISIBLE(dbgw.pclog)) dbgpclog_refresh_window(); if(options3.dbg_dock || GTK_WIDGET_VISIBLE(dbgw.code)) dbgcode_refresh_window(); if(options3.dbg_dock || GTK_WIDGET_VISIBLE(dbgw.stack)) dbgstack_refresh_window(); if(options3.dbg_dock || GTK_WIDGET_VISIBLE(dbgw.heap)) dbgheap_refresh_window(); if(options3.dbg_dock || GTK_WIDGET_VISIBLE(dbgw.iop)) dbgiop_refresh_window(); WND_TMR_STOP("Debugger Refresh Time"); printf("\n"); }
// 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) gtk_debugger_display(); gtk_debugger_refresh(); // enable the debugger if GDB disabled it if (!options3.dbg_dock && !GTK_WIDGET_SENSITIVE(dbgw.regs)) gtk_debugger_enable(); // 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, offset; uint32_t pc; ti68k_bkpt_get_pgmentry_offset(id, &handle, &offset); ti68k_bkpt_del_pgmentry(handle); if(options3.dbg_dock || GTK_WIDGET_VISIBLE(dbgw.bkpts)) dbgbkpts_refresh_window(); delete_command(NULL, 0); symbol_file_clear(0); gdbtk_clear_file (); ti68k_register_get_pc(&pc); pc -= offset-2; 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; }