aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbthread.h
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2011-09-13 14:48:55 +0000
committerPedro Alves <palves@redhat.com>2011-09-13 14:48:55 +0000
commit305962315a5d52b2289bac2623e04abbda158597 (patch)
tree3f1139740da1452554a7e580c79d82b351ddb7c9 /gdb/gdbthread.h
parentbede5f5f81e145b3c1dd21cbf4e8695de83298e6 (diff)
downloadgdb-305962315a5d52b2289bac2623e04abbda158597.zip
gdb-305962315a5d52b2289bac2623e04abbda158597.tar.gz
gdb-305962315a5d52b2289bac2623e04abbda158597.tar.bz2
2011-09-13 Pedro Alves <pedro@codesourcery.com>
* gdbthread.h (enum thread_state): Moved here. (struct thread_info): Rename `executing_' field to `executing' and `state_' to `state'. * thread.c (enum thread_state): Moved to gdbthread.h. (new_thread, add_thread_silent, delete_thread_1) (any_live_thread_of_process, thread_alive, set_running) (set_running, is_thread_state, any_running, is_executing) (set_executing, finish_thread_state, print_thread_info) (do_captured_thread_select): Adjust.
Diffstat (limited to 'gdb/gdbthread.h')
-rw-r--r--gdb/gdbthread.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/gdb/gdbthread.h b/gdb/gdbthread.h
index 6011087..af987f2 100644
--- a/gdb/gdbthread.h
+++ b/gdb/gdbthread.h
@@ -29,6 +29,15 @@ struct symtab;
#include "ui-out.h"
#include "inferior.h"
+/* Frontend view of the thread state. Possible extensions: stepping,
+ finishing, until(ling),... */
+enum thread_state
+{
+ THREAD_STOPPED,
+ THREAD_RUNNING,
+ THREAD_EXITED,
+};
+
/* Inferior thread specific part of `struct infcall_control_state'.
Inferior process counterpart is `struct inferior_control_state'. */
@@ -133,9 +142,7 @@ struct thread_info
from saying that there is an active target and we are stopped at
a breakpoint, for instance. This is a real indicator whether the
thread is off and running. */
- /* This field is internal to thread.c. Never access it directly,
- use is_executing instead. */
- int executing_;
+ int executing;
/* Frontend view of the thread state. Note that the RUNNING/STOPPED
states are different from EXECUTING. When the thread is stopped
@@ -144,9 +151,7 @@ struct thread_info
still be true. As a possible future extension, this could turn
into enum { stopped, exited, stepping, finishing, until(ling),
running ... } */
- /* This field is internal to thread.c. Never access it directly,
- use is_running instead. */
- int state_;
+ int 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
@@ -342,7 +347,7 @@ extern int any_running (void);
marks all threads.
Note that this is different from the running state. See the
- description of state_ and executing_ fields of struct
+ description of state and executing fields of struct
thread_info. */
extern void set_executing (ptid_t ptid, int executing);