/* Fork a Unix child process, and set up to debug it, for GDBserver.
- Copyright (C) 1989-2017 Free Software Foundation, Inc.
+ Copyright (C) 1989-2018 Free Software Foundation, Inc.
This file is part of GDB.
void
prefork_hook (const char *args)
{
+ client_state &cs = get_client_state ();
if (debug_threads)
{
debug_printf ("args: %s\n", args);
/* Clear this so the backend doesn't get confused, thinking
CONT_THREAD died, and it needs to resume all threads. */
- cont_thread = null_ptid;
+ cs.cont_thread = null_ptid;
}
/* See nat/fork-inferior.h. */
void
post_fork_inferior (int pid, const char *program)
{
+ client_state &cs = get_client_state ();
#ifdef SIGTTOU
signal (SIGTTOU, SIG_IGN);
signal (SIGTTIN, SIG_IGN);
#endif
startup_inferior (pid, START_INFERIOR_TRAPS_EXPECTED,
- &last_status, &last_ptid);
+ &cs.last_status, &cs.last_ptid);
current_thread->last_resume_kind = resume_stop;
- current_thread->last_status = last_status;
+ current_thread->last_status = cs.last_status;
signal_pid = pid;
target_post_create_inferior ();
fprintf (stderr, "Process %s created; pid = %d\n", program, pid);