Fix library-list.dtd -> library-list-svr4.dtd
[deliverable/binutils-gdb.git] / gdb / gdbthread.h
index a9f8a941df17e02564ebd3b708aa43ec475dd53a..522b6748914ecdfff8c7ed41deae1cbd6fbceb90 100644 (file)
@@ -1,5 +1,5 @@
 /* Multi-process/thread control defs for GDB, the GNU debugger.
-   Copyright (C) 1987-2013 Free Software Foundation, Inc.
+   Copyright (C) 1987-2014 Free Software Foundation, Inc.
    Contributed by Lynx Real-Time Systems, Inc.  Los Gatos, CA.
    
 
@@ -65,6 +65,14 @@ struct thread_control_state
   CORE_ADDR step_range_start;  /* Inclusive */
   CORE_ADDR step_range_end;    /* Exclusive */
 
+  /* 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
+     thread stops in the step range above.  If this is zero, the
+     target should ignore the step range, and only issue one single
+     step.  */
+  int may_range_step;
+
   /* Stack frame address as of when stepping command was issued.
      This is how we know when we step into a subroutine call, and how
      to set the frame for the breakpoint used to step out.  */
@@ -114,6 +122,11 @@ struct thread_control_state
   /* Chain containing status of breakpoint(s) the thread stopped
      at.  */
   bpstat stop_bpstat;
+
+  /* The interpreter that issued the execution command.  NULL if the
+     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'.
@@ -122,7 +135,13 @@ struct thread_control_state
 
 struct thread_suspend_state
 {
-  /* Last signal that the inferior received (why it stopped).  */
+  /* Last signal that the inferior received (why it stopped).  When
+     the thread is resumed, this signal is delivered.  Note: the
+     target should not check whether the signal is in pass state,
+     because the signal may have been explicitly passed with the
+     "signal" command, which overrides "handle nopass".  If the signal
+     should be suppressed, the core will take care of clearing this
+     before the target is resumed.  */
   enum gdb_signal stop_signal;
 };
 
@@ -144,14 +163,12 @@ struct thread_info
      thread is off and running.  */
   int executing;
 
-  /* Frontend view of the thread state.  Note that the RUNNING/STOPPED
-     states are different from EXECUTING.  When the thread is stopped
-     internally while handling an internal event, like a software
-     single-step breakpoint, EXECUTING will be false, but running will
-     still be true.  As a possible future extension, this could turn
-     into enum { stopped, exited, stepping, finishing, until(ling),
-     running ... }  */
-  int state;
+  /* Frontend view of the thread state.  Note that the THREAD_RUNNING/
+     THREAD_STOPPED states are different from EXECUTING.  When the
+     thread is stopped internally while handling an internal event,
+     like a software single-step breakpoint, EXECUTING will be false,
+     but STATE will still be THREAD_RUNNING.  */
+  enum thread_state state;
 
   /* If this is > 0, then it means there's code out there that relies
      on this thread being listed.  Don't delete it from the lists even
@@ -304,10 +321,12 @@ void thread_change_ptid (ptid_t old_ptid, ptid_t new_ptid);
 typedef int (*thread_callback_func) (struct thread_info *, void *);
 extern struct thread_info *iterate_over_threads (thread_callback_func, void *);
 
-/* Traverse all threads.  */
+/* Traverse all threads, except those that have THREAD_EXITED
+   state.  */
 
-#define ALL_THREADS(T)                         \
-  for (T = thread_list; T; T = T->next)
+#define ALL_NON_EXITED_THREADS(T)                              \
+  for (T = thread_list; T; T = T->next) \
+    if ((T)->state != THREAD_EXITED)
 
 extern int thread_count (void);
 
@@ -315,7 +334,7 @@ extern int thread_count (void);
 extern void switch_to_thread (ptid_t ptid);
 
 /* Marks thread PTID is running, or stopped. 
-   If PIDGET (PTID) is -1, marks all threads.  */
+   If ptid_get_pid (PTID) is -1, marks all threads.  */
 extern void set_running (ptid_t ptid, int running);
 
 /* Marks or clears thread(s) PTID as having been requested to stop.
@@ -350,10 +369,7 @@ extern int is_exited (ptid_t ptid);
 /* In the frontend's perpective, is this thread stopped?  */
 extern int is_stopped (ptid_t ptid);
 
-/* In the frontend's perpective is there any thread running?  */
-extern int any_running (void);
-
-/* Marks thread PTID as executing, or not.  If PIDGET (PTID) is -1,
+/* Marks thread PTID as executing, or not.  If ptid_get_pid (PTID) is -1,
    marks all threads.
 
    Note that this is different from the running state.  See the
@@ -371,7 +387,7 @@ extern int is_executing (ptid_t ptid);
    "executing"     -> "running"
    "exited"        -> "exited"
 
-   If PIDGET (PTID) is -1, go over all threads.
+   If ptid_get_pid (PTID) is -1, go over all threads.
 
    Notifications are only emitted if the thread state did change.  */
 extern void finish_thread_state (ptid_t ptid);
This page took 0.034648 seconds and 4 git commands to generate.