-/* Load infrun state for the thread PID. */
-
-void
-load_infrun_state (ptid_t ptid,
- CORE_ADDR *prev_pc,
- int *trap_expected,
- struct breakpoint **step_resume_breakpoint,
- CORE_ADDR *step_range_start,
- CORE_ADDR *step_range_end,
- struct frame_id *step_frame_id,
- int *stepping_over_breakpoint,
- int *stepping_through_solib_after_catch,
- bpstat *stepping_through_solib_catchpoints,
- int *current_line,
- struct symtab **current_symtab,
- struct continuation **continuations,
- struct continuation **intermediate_continuations,
- int *proceed_to_finish,
- enum step_over_calls_kind *step_over_calls,
- int *stop_step,
- int *step_multi,
- enum target_signal *stop_signal,
- bpstat *stop_bpstat)
-{
- struct thread_info *tp;
-
- /* If we can't find the thread, then we're debugging a single threaded
- process. No need to do anything in that case. */
- tp = find_thread_id (pid_to_thread_id (ptid));
- if (tp == NULL)
- return;
-
- *prev_pc = tp->prev_pc;
- *trap_expected = tp->trap_expected;
- *step_resume_breakpoint = tp->step_resume_breakpoint;
- *step_range_start = tp->step_range_start;
- *step_range_end = tp->step_range_end;
- *step_frame_id = tp->step_frame_id;
- *stepping_over_breakpoint = tp->stepping_over_breakpoint;
- *stepping_through_solib_after_catch =
- tp->stepping_through_solib_after_catch;
- *stepping_through_solib_catchpoints =
- tp->stepping_through_solib_catchpoints;
- *current_line = tp->current_line;
- *current_symtab = tp->current_symtab;
-
- /* In all-stop mode, these are global state, while in non-stop mode,
- they are per thread. */
- if (non_stop)
- {
- *continuations = tp->continuations;
- tp->continuations = NULL;
- *intermediate_continuations = tp->intermediate_continuations;
- tp->intermediate_continuations = NULL;
- *proceed_to_finish = tp->proceed_to_finish;
- *step_over_calls = tp->step_over_calls;
- *stop_step = tp->stop_step;
- *step_multi = tp->step_multi;
- *stop_signal = tp->stop_signal;
-
- /* Swap instead of copy, so we only have to update one of
- them. */
- *stop_bpstat = tp->stop_bpstat;
- tp->stop_bpstat = 0;
- }
-}
-
-/* Save infrun state for the thread PID. */
-
-void
-save_infrun_state (ptid_t ptid,
- CORE_ADDR prev_pc,
- int trap_expected,
- struct breakpoint *step_resume_breakpoint,
- CORE_ADDR step_range_start,
- CORE_ADDR step_range_end,
- const struct frame_id *step_frame_id,
- int stepping_over_breakpoint,
- int stepping_through_solib_after_catch,
- bpstat stepping_through_solib_catchpoints,
- int current_line,
- struct symtab *current_symtab,
- struct continuation *continuations,
- struct continuation *intermediate_continuations,
- int proceed_to_finish,
- enum step_over_calls_kind step_over_calls,
- int stop_step,
- int step_multi,
- enum target_signal stop_signal,
- bpstat stop_bpstat)
-{
- struct thread_info *tp;
-
- /* If we can't find the thread, then we're debugging a single-threaded
- process. Nothing to do in that case. */
- tp = find_thread_id (pid_to_thread_id (ptid));
- if (tp == NULL)
- return;
-
- tp->prev_pc = prev_pc;
- tp->trap_expected = trap_expected;
- tp->step_resume_breakpoint = step_resume_breakpoint;
- tp->step_range_start = step_range_start;
- tp->step_range_end = step_range_end;
- tp->step_frame_id = (*step_frame_id);
- tp->stepping_over_breakpoint = stepping_over_breakpoint;
- tp->stepping_through_solib_after_catch = stepping_through_solib_after_catch;
- tp->stepping_through_solib_catchpoints = stepping_through_solib_catchpoints;
- tp->current_line = current_line;
- tp->current_symtab = current_symtab;
-
- /* In all-stop mode, these are global state, while in non-stop mode,
- they are per thread. */
- if (non_stop)
- {
- tp->continuations = continuations;
- tp->intermediate_continuations = intermediate_continuations;
- tp->proceed_to_finish = proceed_to_finish;
- tp->step_over_calls = step_over_calls;
- tp->stop_step = stop_step;
- tp->step_multi = step_multi;
- tp->stop_signal = stop_signal;
- tp->stop_bpstat = stop_bpstat;
- }
-}
-
-/* Return true if TP is an active thread. */