[Ada] Adjust ada-tasks.c:ada_build_task_list
authorJoel Brobecker <brobecker@gnat.com>
Fri, 16 Sep 2011 19:09:26 +0000 (19:09 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Fri, 16 Sep 2011 19:09:26 +0000 (19:09 +0000)
commit79779fa90bec17308d0d0c4eee27365dc012a0f9
tree86891f62cb08f81852a4adc53ae6c166f98429e8
parente225eb91c10da9c51e56ed9869321e7e854fec30
[Ada] Adjust ada-tasks.c:ada_build_task_list

Originally, this function had a parameter called `warn_if_null'
which would trigger a message to be printed on stdout if the
program was found to not use Ada tasking.  It used one of the printf_
functions for that, which is wrong when considering the context of
GDB/MI interpreters.

So, this patch changes this function to stop printing the message,
and leaves that part to the callers instead.  It also changes the
semantics slightly to return the number of tasks found, rather than
a yes/no answer.  Not strictly needed, but simple enough to do, and
potentially useful later.

gdb/ChangeLog:

        * ada-lang.h (ada_build_task_list): Remove parameter
        `warn_if_null'.
        * ada-tasks.c (ada_build_task_list): Remove parameter
        `warn_if_null'.  Adjust implementation and documentation.
        (valid_task_id, ada_get_environment_task)
        iterate_over_live_ada_tasks): Adjust call to ada_build_task_list.
        (info_tasks_command): Adjust implementation.
        (task_command): Likewise.
        * ravenscar-thread.c (ravenscar_find_new_threads): Fix call
        to ada_build_task_list.
gdb/ChangeLog
gdb/ada-lang.h
gdb/ada-tasks.c
gdb/ravenscar-thread.c
This page took 0.027025 seconds and 4 git commands to generate.