aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/ada-tasks.c15
2 files changed, 17 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 9f959c1..4b1b74e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2010-09-22 Joel Brobecker <brobecker@adacore.com>
+
+ * ada-tasks.c (read_atcb): Do not compute the task ptid when
+ debugging a core file.
+
2010-09-22 Jan Kratochvil <jan.kratochvil@redhat.com>
Code cleanup.
diff --git a/gdb/ada-tasks.c b/gdb/ada-tasks.c
index f57f44f..8e42252 100644
--- a/gdb/ada-tasks.c
+++ b/gdb/ada-tasks.c
@@ -583,9 +583,18 @@ read_atcb (CORE_ADDR task_id, struct ada_task_info *task_info)
}
}
- /* And finally, compute the task ptid. */
-
- if (ada_task_is_alive (task_info))
+ /* And finally, compute the task ptid. Note that there are situations
+ where this cannot be determined:
+ - The task is no longer alive - the ptid is irrelevant;
+ - We are debugging a core file - the thread is not always
+ completely preserved for us to link back a task to its
+ underlying thread. Since we do not support task switching
+ when debugging core files anyway, we don't need to compute
+ that task ptid.
+ In either case, we don't need that ptid, and it is just good enough
+ to set it to null_ptid. */
+
+ if (target_has_execution && ada_task_is_alive (task_info))
task_info->ptid = ptid_from_atcb_common (common_value);
else
task_info->ptid = null_ptid;