OSDN Git Service

[Ada] Fix number of lines in -ada-task-info output
authorbrobecke <brobecke>
Fri, 21 Oct 2011 18:46:02 +0000 (18:46 +0000)
committerbrobecke <brobecke>
Fri, 21 Oct 2011 18:46:02 +0000 (18:46 +0000)
commit2ffc72269ddf1bb96e706706ce3360cc1507f13b
tree9d8b756a4ed31c5fb472dcf6e4c0592a27fc2951
parentded1b0a18134f7e5caa89126c3a6863614317101
[Ada] Fix number of lines in -ada-task-info output

When using the new -ada-task-info command with an argument,
the output would say that there are N entries in the returned
table, (where N is the total number of tasks present in the inferior).
But, in fact, the table would only contain at most 1 entry.

This patch fixes this by properly computing the number of
tasks being displayed before giving it to the uiout.

gdb/ChangeLog:

        * ada-tasks.c (print_ada_task_info): Fix computation of
        number of tasks displayed in command output.

gdb/testsuite/ChangeLog:

        * gdb.ada/mi_task_info/task_switch.adb: New file.
        * gdb.ada/mi_task_info.exp: New file.
gdb/ChangeLog
gdb/ada-tasks.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.ada/mi_task_info.exp [new file with mode: 0644]
gdb/testsuite/gdb.ada/mi_task_info/task_switch.adb [new file with mode: 0644]