static void fbsd_core_detach (char *args, int from_tty) { if (fbsd_thread_active) fbsd_thread_deactivate (); unpush_target (&fbsd_thread_ops); orig_core_ops.to_detach (args, from_tty); /* Clear gdb solib information and symbol file cache, so that after detach and re-attach, new_objfile hook will be called */ clear_solib(); symbol_file_clear(0); }
static void nbsd_thread_detach (struct target_ops *ops, const char *args, int from_tty) { struct target_ops *beneath = find_target_beneath (ops); unpush_target (ops); td_close (main_ta); /* Ordinarily, gdb caches solib information, but this means that it won't call the new_obfile hook on a reattach. Clear the symbol file cache so that attach -> detach -> attach works. */ clear_solib(); symbol_file_clear(0); beneath->to_detach (beneath, args, from_tty); nbsd_thread_deactivate (); }
void exec_file_attach (char *filename, int from_tty) { /* Remove any previous exec file. */ exec_close (); if (!ptid_equal (inferior_ptid, null_ptid)) { target_kill (); init_thread_list (); struct program_space *ss; ALL_PSPACES (ss) { set_current_program_space (ss); breakpoint_program_space_exit (ss); } symbol_file_clear (0); }
// 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; }