diff options
author | Philippe Waroquiers <philippe.waroquiers@skynet.be> | 2019-06-08 19:47:51 +0200 |
---|---|---|
committer | Philippe Waroquiers <philippe.waroquiers@skynet.be> | 2019-09-12 21:57:10 +0200 |
commit | 4993045d18d69ecee41ca341cde6bbed220dc8a4 (patch) | |
tree | 45c461f5ed3751b96e92d99064128f57ca3d76c6 /gdb/NEWS | |
parent | 0d41d9a2aa059e89d46e549d7d3a367a35a4b739 (diff) | |
download | gdb-4993045d18d69ecee41ca341cde6bbed220dc8a4.zip gdb-4993045d18d69ecee41ca341cde6bbed220dc8a4.tar.gz gdb-4993045d18d69ecee41ca341cde6bbed220dc8a4.tar.bz2 |
Output the Ada task name in more messages.
With this patch, we e.g. get:
[Switching to task 2 "task_list(1)"]
[Current task is 2 "task_list(1)"]
instead of
[Switching to task 2]
[Current task is 2]
The logic to produce the taskno optionally followed
by the task name has been factorized in the task_to_str function.
Task names are output between double quotes in the new messages,
similarly to what GDB does for thread names.
However, no quotes are put around task names in 'info tasks' Name column.
This was discussed with Tom, that preferred no quotes there, while I
was more in favour of visual consistency.
I discussed with a few more users, which led to (exactly) 50% preferring
quotes and 50% preferring no quotes :).
To arrive to the decision to remove the quotes, the following "killing args"
were used:
* To have quotes or to not have quotes, that is the question; yes
but not *THE* question :).
* If there is not a clear majority that prefers quotes, better to
not disturb the existing user basis for a (somewhat) irrelevant
aspect.
* The opinion of the reviewer has more weight.
So, compared to the previous version, this version remotes the quotes
in 'info tasks'.
It improves the alignement of 'info tasks' output.
With this patch, we get:
(gdb) info task
ID TID P-ID Pri State Name
* 1 555555759030 48 Runnable main_task
2 555555759e30 1 48 Selective Wait mit
(gdb)
instead of
(gdb) info task
ID TID P-ID Pri State Name
* 1 555555759030 48 Runnable main_task
2 555555759e30 1 48 Selective Wait mit
(gdb)
(e.g. the first one properly shows parent and priority under the
correct header).
This is version 4 of the 'task name' patch.
Compared to version 3, the changes are:
output task names between quotes but not in 'info tasks'
gdb/ChangeLog
2019-09-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
* NEWS: Announce that Ada task names are now shown at more places,
and between quotes (except in info task output).
* gdb/ada-tasks.c (task_to_str): New function.
(display_current_task_id): Call task_to_str.
(task_command_1): Likewise.
(print_ada_task_info): In non-mi mode, Properly align headers and data
when task-id length is > 9 (9 is the default for a 32 bits CORE_ADDR).
gdb/doc/ChangeLog
2019-09-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
* gdb.texinfo (Ada Tasks): Tell the task name is printed, update
examples.
gdb/testsuite/ChangeLog
2019-09-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
* gdb.ada/rdv_wait.exp: Update to new task names.
* gdb.base/task_switch_in_core.exp: Likewise.
* gdb.base/info_sources_base.c: Likewise.
Diffstat (limited to 'gdb/NEWS')
-rw-r--r-- | gdb/NEWS | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -29,6 +29,9 @@ * The RX port now supports XML target descriptions. +* GDB now shows the Ada task names at more places, e.g. in task switching + messages. + * Python API ** The gdb.Value type has a new method 'format_string' which returns a |