gdb/
[deliverable/binutils-gdb.git] / gdb / infcmd.c
index c4cdb06478d34b785dc039da5d5f9e7d7d6cab88..9664468ff0f66e3beb2daa9611e89a6dc280fec3 100644 (file)
@@ -753,7 +753,7 @@ Can't resume all threads and specify proceed count simultaneously."));
          tp = find_thread_ptid (last_ptid);
        }
       if (tp != NULL)
-       bs = tp->stop_bpstat;
+       bs = tp->control.stop_bpstat;
 
       while ((stat = bpstat_num (&bs, &num)) != 0)
        if (stat > 0)
@@ -885,7 +885,7 @@ step_1 (int skip_subroutines, int single_inst, char *count_string)
          else
            tp = NULL;
 
-         if (!tp || !tp->stop_step || !tp->step_multi)
+         if (!tp || !tp->control.stop_step || !tp->step_multi)
            {
              /* If we stopped for some reason that is not stepping
                 there are no further steps to make.  */
@@ -935,7 +935,7 @@ step_1_continuation (void *args)
       struct thread_info *tp;
 
       tp = inferior_thread ();
-      if (tp->step_multi && tp->stop_step)
+      if (tp->step_multi && tp->control.stop_step)
        {
          /* There are more steps to make, and we did stop due to
             ending a stepping range.  Do another step.  */
@@ -993,18 +993,19 @@ step_once (int skip_subroutines, int single_inst, int count, int thread)
 
          pc = get_frame_pc (frame);
          find_pc_line_pc_range (pc,
-                                &tp->step_range_start, &tp->step_range_end);
+                                &tp->control.step_range_start,
+                                &tp->control.step_range_end);
 
          /* If we have no line info, switch to stepi mode.  */
-         if (tp->step_range_end == 0 && step_stop_if_no_debug)
-           tp->step_range_start = tp->step_range_end = 1;
-         else if (tp->step_range_end == 0)
+         if (tp->control.step_range_end == 0 && step_stop_if_no_debug)
+           tp->control.step_range_start = tp->control.step_range_end = 1;
+         else if (tp->control.step_range_end == 0)
            {
              char *name;
 
              if (find_pc_partial_function (pc, &name,
-                                           &tp->step_range_start,
-                                           &tp->step_range_end) == 0)
+                                           &tp->control.step_range_start,
+                                           &tp->control.step_range_end) == 0)
                error (_("Cannot find bounds of current function"));
 
              target_terminal_ours ();
@@ -1016,16 +1017,16 @@ which has no line number information.\n"), name);
       else
        {
          /* Say we are stepping, but stop after one insn whatever it does.  */
-         tp->step_range_start = tp->step_range_end = 1;
+         tp->control.step_range_start = tp->control.step_range_end = 1;
          if (!skip_subroutines)
            /* It is stepi.
               Don't step over function calls, not even to functions lacking
               line numbers.  */
-           tp->step_over_calls = STEP_OVER_NONE;
+           tp->control.step_over_calls = STEP_OVER_NONE;
        }
 
       if (skip_subroutines)
-       tp->step_over_calls = STEP_OVER_ALL;
+       tp->control.step_over_calls = STEP_OVER_ALL;
 
       tp->step_multi = (count > 1);
       proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 1);
@@ -1255,18 +1256,18 @@ until_next_command (int from_tty)
       if (msymbol == NULL)
        error (_("Execution is not within a known function."));
 
-      tp->step_range_start = SYMBOL_VALUE_ADDRESS (msymbol);
-      tp->step_range_end = pc;
+      tp->control.step_range_start = SYMBOL_VALUE_ADDRESS (msymbol);
+      tp->control.step_range_end = pc;
     }
   else
     {
       sal = find_pc_line (pc, 0);
 
-      tp->step_range_start = BLOCK_START (SYMBOL_BLOCK_VALUE (func));
-      tp->step_range_end = sal.end;
+      tp->control.step_range_start = BLOCK_START (SYMBOL_BLOCK_VALUE (func));
+      tp->control.step_range_end = sal.end;
     }
 
-  tp->step_over_calls = STEP_OVER_ALL;
+  tp->control.step_over_calls = STEP_OVER_ALL;
 
   tp->step_multi = 0;          /* Only one call to proceed */
 
@@ -1429,7 +1430,7 @@ finish_command_continuation (void *arg)
       && is_stopped (inferior_ptid))
     {
       tp = inferior_thread ();
-      bs = tp->stop_bpstat;
+      bs = tp->control.stop_bpstat;
     }
 
   if (bpstat_find_breakpoint (bs, a->breakpoint) != NULL
@@ -1460,7 +1461,7 @@ finish_command_continuation (void *arg)
 
   /* We suppress normal call of normal_stop observer and do it here so
      that the *stopped notification includes the return value.  */
-  if (bs != NULL && tp->proceed_to_finish)
+  if (bs != NULL && tp->control.proceed_to_finish)
     observer_notify_normal_stop (bs, 1 /* print frame */);
   delete_breakpoint (a->breakpoint);
 }
@@ -1493,7 +1494,7 @@ finish_backward (struct symbol *function)
   sal = find_pc_line (func_addr, 0);
 
   /* We don't need a return value.  */
-  tp->proceed_to_finish = 0;
+  tp->control.proceed_to_finish = 0;
   /* Special case: if we're sitting at the function entry point,
      then all we need to do is take a reverse singlestep.  We
      don't need to set a breakpoint, and indeed it would do us
@@ -1519,7 +1520,8 @@ finish_backward (struct symbol *function)
       old_chain = make_cleanup_delete_breakpoint (breakpoint);
       proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 0);
       /* We will be stopped when proceed returns.  */
-      back_up = bpstat_find_breakpoint (tp->stop_bpstat, breakpoint) != NULL;
+      back_up = (bpstat_find_breakpoint (tp->control.stop_bpstat, breakpoint)
+                != NULL);
       do_cleanups (old_chain);
     }
   else
@@ -1529,7 +1531,7 @@ finish_backward (struct symbol *function)
       /* If in fact we hit the step-resume breakpoint (and not
         some other breakpoint), then we're almost there --
         we just need to back up by one more single-step.  */
-      tp->step_range_start = tp->step_range_end = 1;
+      tp->control.step_range_start = tp->control.step_range_end = 1;
       proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 1);
     }
   return;
@@ -1556,7 +1558,8 @@ finish_forward (struct symbol *function, struct frame_info *frame)
 
   old_chain = make_cleanup_delete_breakpoint (breakpoint);
 
-  tp->proceed_to_finish = 1;    /* We want stop_registers, please...  */
+  /* We want stop_registers, please...  */
+  tp->control.proceed_to_finish = 1;
   cargs = xmalloc (sizeof (*cargs));
 
   cargs->breakpoint = breakpoint;
@@ -1632,8 +1635,9 @@ finish_command (char *arg, int from_tty)
 
       init_sal (&empty_sal);
       set_step_info (frame, empty_sal);
-      tp->step_range_start = tp->step_range_end = get_frame_pc (frame);
-      tp->step_over_calls = STEP_OVER_ALL;
+      tp->control.step_range_start = get_frame_pc (frame);
+      tp->control.step_range_end = tp->control.step_range_start;
+      tp->control.step_over_calls = STEP_OVER_ALL;
 
       /* Print info on the selected frame, including level number but not
         source.  */
@@ -1699,13 +1703,13 @@ program_info (char *args, int from_tty)
     error (_("Selected thread is running."));
 
   tp = find_thread_ptid (ptid);
-  bs = tp->stop_bpstat;
+  bs = tp->control.stop_bpstat;
   stat = bpstat_num (&bs, &num);
 
   target_files_info ();
   printf_filtered (_("Program stopped at %s.\n"),
                   paddress (target_gdbarch, stop_pc));
-  if (tp->stop_step)
+  if (tp->control.stop_step)
     printf_filtered (_("It stopped after being stepped.\n"));
   else if (stat != 0)
     {
@@ -1723,11 +1727,11 @@ It stopped at a breakpoint that has since been deleted.\n"));
          stat = bpstat_num (&bs, &num);
        }
     }
-  else if (tp->stop_signal != TARGET_SIGNAL_0)
+  else if (tp->suspend.stop_signal != TARGET_SIGNAL_0)
     {
       printf_filtered (_("It stopped with signal %s, %s.\n"),
-                      target_signal_to_name (tp->stop_signal),
-                      target_signal_to_string (tp->stop_signal));
+                      target_signal_to_name (tp->suspend.stop_signal),
+                      target_signal_to_string (tp->suspend.stop_signal));
     }
 
   if (!from_tty)
@@ -2206,7 +2210,7 @@ proceed_after_attach_callback (struct thread_info *thread,
       && !is_exited (thread->ptid)
       && !is_executing (thread->ptid)
       && !thread->stop_requested
-      && thread->stop_signal == TARGET_SIGNAL_0)
+      && thread->suspend.stop_signal == TARGET_SIGNAL_0)
     {
       switch_to_thread (thread->ptid);
       clear_proceed_status ();
@@ -2256,7 +2260,7 @@ attach_command_post_wait (char *args, int from_tty, int async_exec)
   struct inferior *inferior;
 
   inferior = current_inferior ();
-  inferior->stop_soon = NO_STOP_QUIETLY;
+  inferior->control.stop_soon = NO_STOP_QUIETLY;
 
   /* If no exec file is yet known, try to determine it from the
      process itself.  */
@@ -2308,7 +2312,7 @@ attach_command_post_wait (char *args, int from_tty, int async_exec)
        proceed_after_attach (inferior->pid);
       else
        {
-         if (inferior_thread ()->stop_signal == TARGET_SIGNAL_0)
+         if (inferior_thread ()->suspend.stop_signal == TARGET_SIGNAL_0)
            {
              clear_proceed_status ();
              proceed ((CORE_ADDR) -1, TARGET_SIGNAL_DEFAULT, 0);
@@ -2447,7 +2451,7 @@ attach_command (char *args, int from_tty)
         need a way for handle_inferior_event to reset the stop_signal
         variable after an attach, and this is what
         STOP_QUIETLY_NO_SIGSTOP is for.  */
-      inferior->stop_soon = STOP_QUIETLY_NO_SIGSTOP;
+      inferior->control.stop_soon = STOP_QUIETLY_NO_SIGSTOP;
 
       if (target_can_async_p ())
        {
@@ -2510,7 +2514,7 @@ notice_new_inferior (ptid_t ptid, int leave_running, int from_tty)
         that.  */
       target_stop (inferior_ptid);
 
-      inferior->stop_soon = STOP_QUIETLY_REMOTE;
+      inferior->control.stop_soon = STOP_QUIETLY_REMOTE;
 
       /* Wait for stop before proceeding.  */
       if (target_can_async_p ())
This page took 0.032467 seconds and 4 git commands to generate.