diff options
author | Tom Tromey <tromey@adacore.com> | 2019-11-21 09:05:10 -0700 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2019-11-22 15:11:57 -0700 |
commit | c83d8d32c9b3379a39c434fcaa9f304b6e4432ca (patch) | |
tree | 742c0a8d8eb8628814acb573f5ee605a8c8b216e /gdb/gdbserver | |
parent | 987012b89bce7f6385ed88585547f852a8005a3f (diff) | |
download | gdb-c83d8d32c9b3379a39c434fcaa9f304b6e4432ca.zip gdb-c83d8d32c9b3379a39c434fcaa9f304b6e4432ca.tar.gz gdb-c83d8d32c9b3379a39c434fcaa9f304b6e4432ca.tar.bz2 |
Avoid crash in print_ada_task_info
In MI mode, print_ada_task_info can crash in find_thread_ptid when
trying to print an Ada task that is no longer alive. This patch
avoids the problem by checking for this case.
Because this is Ada-specific, and because Joel approved it internally,
I am checking it in.
gdb/ChangeLog
2019-11-22 Tom Tromey <tromey@adacore.com>
* ada-tasks.c (ada_task_is_alive): Make parameter const.
(print_ada_task_info): Don't try to fetch thread id if task is not
alive.
gdb/gdbserver/ChangeLog
2019-11-22 Tom Tromey <tromey@adacore.com>
* gdb.ada/tasks.exp: Add -ada-task-info regression test.
* gdb.ada/tasks/foo.adb: Add another stopping location.
Change-Id: If25eae6507eebb7537eb8adbcbaa1fc1eec88f5c
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index a5da6b5..0241438 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,8 @@ +2019-11-22 Tom Tromey <tromey@adacore.com> + + * gdb.ada/tasks.exp: Add -ada-task-info regression test. + * gdb.ada/tasks/foo.adb: Add another stopping location. + 2019-11-20 Luis Machado <luis.machado@linaro.org> * linux-aarch64-low.c (is_sve_tdesc): Check against target feature |