/* Tracepoint code for remote server for GDB.
- Copyright (C) 2009-2014 Free Software Foundation, Inc.
+ Copyright (C) 2009-2015 Free Software Foundation, Inc.
This file is part of GDB.
struct tracepoint *prev_stpoint;
pause_all (1);
- cancel_breakpoints ();
prev_stpoint = NULL;
We can't now, since we may be getting here due to the inferior
agent calling us. */
pause_all (1);
- /* Since we're removing breakpoints, cancel breakpoint hits,
- possibly related to the breakpoints we're about to delete. */
- cancel_breakpoints ();
/* Stop logging. Tracepoints can still be hit, but they will not be
recorded. */
if (!maybe_write_ipa_not_loaded (buf))
{
- struct thread_info *save_inferior;
+ struct thread_info *saved_thread;
- save_inferior = current_inferior;
+ saved_thread = current_thread;
/* Find any thread which belongs to process PID. */
- current_inferior = (struct thread_info *)
+ current_thread = (struct thread_info *)
find_inferior (&all_threads, same_process_p, &pid);
strcpy (buf, "close");
run_inferior_command (buf, strlen (buf) + 1);
- current_inferior = save_inferior;
+ current_thread = saved_thread;
}
}
static void
cmd_qtminftpilen (char *packet)
{
- if (current_inferior == NULL)
+ if (current_thread == NULL)
{
/* Indicate that the minimum length is currently unknown. */
strcpy (packet, "0");
trace_debug ("Done uploading traceframes [%d]\n", curr_tbctrl_idx);
pause_all (1);
- cancel_breakpoints ();
delete_breakpoint (about_to_request_buffer_space_bkpt);
about_to_request_buffer_space_bkpt = NULL;
/* Sleep endlessly to wait the whole inferior stops. This
thread can not exit because GDB or GDBserver may still need
- 'current_inferior' (representing this thread) to access
+ 'current_thread' (representing this thread) to access
inferior memory. Otherwise, this thread exits earlier than
- other threads, and 'current_inferior' is set to NULL. */
+ other threads, and 'current_thread' is set to NULL. */
while (1)
sleep (10);
}