This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit/Ada] Remove the "Running" state
- From: Joel Brobecker <brobecker at adacore dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 31 Mar 2009 09:39:40 -0700
- Subject: [commit/Ada] Remove the "Running" state
Some users reported that they found that a task state shown as "Running"
was confusing. Since this was not a real state as provided by the
runtime, and since the implementation of this feature was bogus
(if you switch to another "runnable" task, it becomes "running"),
we decided to remove this state entirely, and just display what
the runtime tells us about the task.
gdb/
2009-03-31 Joel Brobecker <brobecker@adacore.com>
* ada-tasks.c (short_task_info): Eliminate the "Running" task state.
gdb/doc/
2009-03-31 Joel Brobecker <brobecker@adacore.com>
* gdb.texinfo (Ada Tasks): Remove the documentation about
the "Running" state, as this state has been eliminated.
Now all runnable tasks are shown as "Runnable".
Tested on x86_64-linux and checked in.
--
Joel
diff --git a/gdb/ada-tasks.c b/gdb/ada-tasks.c
index d0ce5ab..7504491 100644
--- a/gdb/ada-tasks.c
+++ b/gdb/ada-tasks.c
@@ -711,9 +711,6 @@ short_task_info (int taskno)
else if (task_info->state == Entry_Caller_Sleep && task_info->called_task)
printf_filtered (_(" Waiting on RV with %-3d"),
get_task_number_from_id (task_info->called_task));
- else if (task_info->state == Runnable && active_task_p)
- /* Replace "Runnable" by "Running" since this is the active task. */
- printf_filtered (" %-22s", _("Running"));
else
printf_filtered (" %-22s", _(task_states[task_info->state]));
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 3135c18..a1c0b80 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -11614,7 +11614,7 @@ This command shows a list of current Ada tasks, as in the following example:
1 8088000 0 15 Child Activation Wait main_task
2 80a4000 1 15 Accept Statement b
3 809a800 1 15 Child Activation Wait a
-* 4 80ae800 3 15 Running c
+* 4 80ae800 3 15 Runnable c
@end smallexample
@@ -11643,9 +11643,6 @@ Current state of the task.
The task has been created but has not been activated. It cannot be
executing.
-@item Running
-The task currently running.
-
@item Runnable
The task is not blocked for any reason known to Ada. (It may be waiting
for a mutex, though.) It is conceptually "executing" in normal mode.
@@ -11701,7 +11698,7 @@ the following example:
(@value{GDBP}) info tasks
ID TID P-ID Pri State Name
1 8077880 0 15 Child Activation Wait main_task
-* 2 807c468 1 15 Running task_1
+* 2 807c468 1 15 Runnable task_1
(@value{GDBP}) info task 2
Ada Task: 0x807c468
Name: task_1
@@ -11723,7 +11720,7 @@ This command prints the ID of the current task.
(@value{GDBP}) info tasks
ID TID P-ID Pri State Name
1 8077870 0 15 Child Activation Wait main_task
-* 2 807c458 1 15 Running t
+* 2 807c458 1 15 Runnable t
(@value{GDBP}) task
[Current task is 2]
@end smallexample
@@ -11741,7 +11738,7 @@ from the current task to the given task.
(@value{GDBP}) info tasks
ID TID P-ID Pri State Name
1 8077870 0 15 Child Activation Wait main_task
-* 2 807c458 1 15 Running t
+* 2 807c458 1 15 Runnable t
(@value{GDBP}) task 1
[Switching to task 1]
#0 0x8067726 in pthread_cond_wait ()