Uniquefy gdb.threads/attach-into-signal.exp
[deliverable/binutils-gdb.git] / gdb / gdbthread.h
index e9ae47df1c15a5d73d90616090c0690a83be092c..fefad480066fbde96b941a57f6dd32834710cfca 100644 (file)
@@ -73,6 +73,9 @@ struct thread_control_state
   CORE_ADDR step_range_start;  /* Inclusive */
   CORE_ADDR step_range_end;    /* Exclusive */
 
+  /* Function the thread was in as of last it started stepping.  */
+  struct symbol *step_start_function;
+
   /* If GDB issues a target step request, and this is nonzero, the
      target should single-step this thread once, and then continue
      single-stepping it without GDB core involvement as long as the
@@ -115,7 +118,7 @@ struct thread_control_state
   int trap_expected;
 
   /* Nonzero if the thread is being proceeded for a "finish" command
-     or a similar situation when stop_registers should be saved.  */
+     or a similar situation when return value should be printed.  */
   int proceed_to_finish;
 
   /* Nonzero if the thread is being proceeded for an inferior function
@@ -135,11 +138,14 @@ struct thread_control_state
      thread was resumed as a result of a command applied to some other
      thread (e.g., "next" with scheduler-locking off).  */
   struct interp *command_interp;
-};
 
-/* Inferior thread specific part of `struct infcall_suspend_state'.
+  /* Whether the command that started the thread was a stepping
+     command.  This is used to decide whether "set scheduler-locking
+     step" behaves like "on" or "off".  */
+  int stepping_command;
+};
 
-   Inferior process counterpart is `struct inferior_suspend_state'.  */
+/* Inferior thread specific part of `struct infcall_suspend_state'.  */
 
 struct thread_suspend_state
 {
@@ -372,13 +378,12 @@ extern struct thread_info *iterate_over_threads (thread_callback_func, void *);
   for (T = thread_list; T; T = T->next) \
     if ((T)->state != THREAD_EXITED)
 
-/* Like ALL_NON_EXITED_THREADS, but allows deleting the currently
-   iterated thread.  */
-#define ALL_NON_EXITED_THREADS_SAFE(T, TMP)    \
+/* Traverse all threads, including those that have THREAD_EXITED
+   state.  Allows deleting the currently iterated thread.  */
+#define ALL_THREADS_SAFE(T, TMP)       \
   for ((T) = thread_list;                      \
        (T) != NULL ? ((TMP) = (T)->next, 1): 0;        \
-       (T) = (TMP))                            \
-    if ((T)->state != THREAD_EXITED)
+       (T) = (TMP))
 
 extern int thread_count (void);
 
@@ -476,6 +481,11 @@ extern void update_thread_list (void);
 
 extern void prune_threads (void);
 
+/* Delete threads marked THREAD_EXITED.  Unlike prune_threads, this
+   does not consult the target about whether the thread is alive right
+   now.  */
+extern void delete_exited_threads (void);
+
 /* Return true if PC is in the stepping range of THREAD.  */
 
 int pc_in_thread_step_range (CORE_ADDR pc, struct thread_info *thread);
This page took 0.028319 seconds and 4 git commands to generate.