- fill_gregset ((gdb_gregset_t *) gregset, -1);
- fill_fpregset (&fpregset, -1);
-
- err = td_thr_setgregs_p (&thread_info->private->th, gregset);
- if (err != TD_OK)
- error (_("Cannot store general-purpose registers for thread %ld: %s"),
- (long) GET_THREAD (inferior_ptid), thread_db_err_str (err));
- err = td_thr_setfpregs_p (&thread_info->private->th, &fpregset);
- if (err != TD_OK)
- error (_("Cannot store floating-point registers for thread %ld: %s"),
- (long) GET_THREAD (inferior_ptid), thread_db_err_str (err));
-}
-
-static void
-thread_db_kill (void)
-{
- /* There's no need to save & restore inferior_ptid here, since the
- inferior isn't supposed to survive this function call. */
- inferior_ptid = lwp_from_thread (inferior_ptid);
- target_beneath->to_kill ();
-}
-
-static void
-thread_db_create_inferior (char *exec_file, char *allargs, char **env,
- int from_tty)
-{
- unpush_target (&thread_db_ops);
- using_thread_db = 0;
- target_beneath->to_create_inferior (exec_file, allargs, env, from_tty);
-}
-
-static void
-thread_db_post_startup_inferior (ptid_t ptid)
-{
- if (proc_handle.pid == 0)
- {
- /* The child process is now the actual multi-threaded
- program. Snatch its process ID... */
- proc_handle.pid = GET_PID (ptid);
-
- /* ...and perform the remaining initialization steps. */
- enable_thread_event_reporting ();
- thread_db_find_new_threads ();
- }