(Ada) Add support for task switching when debugging core files
authorJoel Brobecker <brobecker@adacore.com>
Thu, 14 Dec 2017 03:36:42 +0000 (22:36 -0500)
committerJoel Brobecker <brobecker@adacore.com>
Thu, 14 Dec 2017 04:00:03 +0000 (23:00 -0500)
commite05fa6f9df82886043e1f1df30e0b9be3fee2d55
tree448b0849c1e54c331c8d8f37993cbd0363662f4c
parentb3e7dd3c9d05064d845afafe52a7539948823788
(Ada) Add support for task switching when debugging core files

The reasons for not supporting task switching when debugging core files
appear to now mostly be OBE. In particular, on GNU/Linux, the thread
layer is now able to retrieve the same thread info as in the live
process. So, this patch is mostly about just removing the guard
that limited the use of task switching to live processes.

gdb/ChangeLog:

        * ada-tasks.c (read_atcb): Properly set task_info->ptid
        when !target_has_execution as well.
        (task_command): Remove error when !target_has_execution.

gdb/testsuite/ChangeLog:

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