This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit] Implement task switching on pa-hpux.


Hello,

FYI, I just checked the following patch in.  It fixes task switching
on pa-hpux.  This is similar to what was happening on solaris
(http://www.sourceware.org/ml/gdb-patches/2010-05/msg00175.html):

    (gdb) task 1
    [new-thread notifications]
    Unable to compute thread ID for task 1.
    Cannot switch to this task.

gdb/ChangeLog:

        * inf-ttrace.c (inf_ttrace_get_ada_task_ptid): New function.
        (inf_ttrace_target): Set t->to_get_ada_task_ptid.

Tested on pa-hpux (gdb.ada/tasks.exp now PASSes).  Checked in.

---
 gdb/ChangeLog    |    6 ++++++
 gdb/inf-ttrace.c |   10 ++++++++++
 2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 1725c3b..f4b6639 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2010-05-08  Joel Brobecker  <brobecker@adacore.com>
+
+	Implement task switching on pa-hpux.
+	* inf-ttrace.c (inf_ttrace_get_ada_task_ptid): New function.
+	(inf_ttrace_target): Set t->to_get_ada_task_ptid.
+
 2010-05-08  Pierre Muller  <muller@ics.u-strasbg.fr>
 
 	* valops.c (find_overload_match): Add missing i18n markup.
diff --git a/gdb/inf-ttrace.c b/gdb/inf-ttrace.c
index 708a07c..199ceb9 100644
--- a/gdb/inf-ttrace.c
+++ b/gdb/inf-ttrace.c
@@ -1243,6 +1243,15 @@ inf_ttrace_pid_to_str (struct target_ops *ops, ptid_t ptid)
 }
 
 
+/* Implement the get_ada_task_ptid target_ops method.  */
+
+static ptid_t
+inf_ttrace_get_ada_task_ptid (long lwp, long thread)
+{
+  return ptid_build (ptid_get_pid (inferior_ptid), lwp, 0);
+}
+
+
 struct target_ops *
 inf_ttrace_target (void)
 {
@@ -1267,6 +1276,7 @@ inf_ttrace_target (void)
   t->to_extra_thread_info = inf_ttrace_extra_thread_info;
   t->to_pid_to_str = inf_ttrace_pid_to_str;
   t->to_xfer_partial = inf_ttrace_xfer_partial;
+  t->to_get_ada_task_ptid = inf_ttrace_get_ada_task_ptid;
 
   return t;
 }
-- 
1.6.3.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]