aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2018-11-23 13:36:59 +0000
committerPedro Alves <palves@redhat.com>2018-11-23 13:36:59 +0000
commit6af05e645ab7fbbb4e0b663f50febf052e6d09a0 (patch)
tree9743b9e70a55c511961125fe921c5177dee3ccb0
parent8e4b63920116e5c0e5c7efbda29160356b3c868d (diff)
downloadgdb-6af05e645ab7fbbb4e0b663f50febf052e6d09a0.zip
gdb-6af05e645ab7fbbb4e0b663f50febf052e6d09a0.tar.gz
gdb-6af05e645ab7fbbb4e0b663f50febf052e6d09a0.tar.bz2
Remove declarations of is_running/is_stopped/is_exited
The recent commit 080363310650 ("Per-inferior thread list, thread ranges/iterators, down with ALL_THREADS, etc.") removed the definitions of is_running/is_stopped/is_exited but missed removing the declarations. gdb/ChangeLog: 2018-11-23 Pedro Alves <palves@redhat.com> * gdbthread.h (enum thread_state): Move comments here. (is_running, is_stopped, is_exited): Remove declarations.
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/gdbthread.h48
2 files changed, 27 insertions, 26 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0b8651c..90e8d7a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2018-11-23 Pedro Alves <palves@redhat.com>
+
+ * gdbthread.h (enum thread_state): Move comments here.
+ (is_running, is_stopped, is_exited): Remove declarations.
+
2018-11-22 Pedro Alves <palves@redhat.com>
* Makefile.in (COMMON_SFILES): Add thread-iter.c.
diff --git a/gdb/gdbthread.h b/gdb/gdbthread.h
index 94fc1b7..2e8f4f1 100644
--- a/gdb/gdbthread.h
+++ b/gdb/gdbthread.h
@@ -36,11 +36,32 @@ struct symtab;
struct inferior;
/* Frontend view of the thread state. Possible extensions: stepping,
- finishing, until(ling),... */
+ finishing, until(ling),...
+
+ NOTE: Since the thread state is not a boolean, most times, you do
+ not want to check it with negation. If you really want to check if
+ the thread is stopped,
+
+ use (good):
+
+ if (tp->state == THREAD_STOPPED)
+
+ instead of (bad):
+
+ if (tp->state != THREAD_RUNNING)
+
+ The latter is also true for exited threads, most likely not what
+ you want. */
enum thread_state
{
+ /* In the frontend's perpective, the thread is stopped. */
THREAD_STOPPED,
+
+ /* In the frontend's perpective, the thread is running. */
THREAD_RUNNING,
+
+ /* The thread is listed, but known to have exited. We keep it
+ listed (but not visible) until it's safe to delete it. */
THREAD_EXITED,
};
@@ -566,31 +587,6 @@ extern void set_running (ptid_t ptid, int running);
observer is called with PTID as argument. */
extern void set_stop_requested (ptid_t ptid, int stop);
-/* NOTE: Since the thread state is not a boolean, most times, you do
- not want to check it with negation. If you really want to check if
- the thread is stopped,
-
- use (good):
-
- if (is_stopped (ptid))
-
- instead of (bad):
-
- if (!is_running (ptid))
-
- The latter also returns true on exited threads, most likelly not
- what you want. */
-
-/* Reports if in the frontend's perpective, thread PTID is running. */
-extern int is_running (ptid_t ptid);
-
-/* Is this thread listed, but known to have exited? We keep it listed
- (but not visible) until it's safe to delete. */
-extern int is_exited (ptid_t ptid);
-
-/* In the frontend's perpective, is this thread stopped? */
-extern int is_stopped (ptid_t ptid);
-
/* Marks thread PTID as executing, or not. If PTID is minus_one_ptid,
marks all threads.