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]

Re: [commit/AIX] Debugger is crashing when debugging program


> > I'm curious, why &current_target here instead of 'ops'?  This will call
> > aix_thread_thread_alive  and aix_thread_pid_to_str two times, as
> > current_target.beneath == aix_thread.
> 
> !!! Typo. Will fix immediately.

Fixed thusly.

2009-03-15  Joel Brobecker  <brobecker@adacore.com>

        * aix-thread.c (aix_thread_thread_alive, aix_thread_pid_to_str):
        Use the ops parameter to get to the target beneath, rather than
        using the current_target global.  Using the current_target global
        was an accident.

Tested on powerpc-aix. Checked in.

Thanks again, Pedro.
-- 
Joel
Index: aix-thread.c
===================================================================
--- aix-thread.c	(revision 146289)
+++ aix-thread.c	(working copy)
@@ -1676,7 +1676,7 @@ aix_thread_mourn_inferior (struct target
 static int
 aix_thread_thread_alive (struct target_ops *ops, ptid_t ptid)
 {
-  struct target_ops *beneath = find_target_beneath (&current_target);
+  struct target_ops *beneath = find_target_beneath (ops);
 
   if (!PD_TID (ptid))
     return beneath->to_thread_alive (beneath, ptid);
@@ -1693,7 +1693,7 @@ static char *
 aix_thread_pid_to_str (struct target_ops *ops, ptid_t ptid)
 {
   static char *ret = NULL;
-  struct target_ops *beneath = find_target_beneath (&current_target);
+  struct target_ops *beneath = find_target_beneath (ops);
 
   if (!PD_TID (ptid))
     return beneath->to_pid_to_str (beneath, ptid);

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