This is the mail archive of the gdb-patches@sources.redhat.com 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]

infttrace vs add_thread



When add_thread was changed to accept a ptid_t type instead of just an
integer, nobody updated infttrace.c to reflect those changes.

The net result is a segfault if you try to use GDB on hpux11.

Again, since I'm no longer a GDB maintainer, I'll hold off installing the
fix until approved by a GDB maintainer.


	* infttrate.c (child_acknowledge_created_inferior): Pass
	correct argument to add_thread.
	(update_thread_state_after_attach): Likewise.
Index: infttrace.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gdb/infttrace.c,v
retrieving revision 2.22
diff -c -3 -p -r2.22 infttrace.c
*** infttrace.c	2001/09/30 19:16:20	2.22
--- infttrace.c	2001/12/18 17:50:01
*************** child_acknowledge_created_inferior (int 
*** 3123,3129 ****
     *    the process safely to ask what it is.  Anyway, we'll
     *    add it when it gets the EXEC event.
     */
!   add_thread (pid);		/* in thread.c */
  
    /* We can now set the child's ttrace event mask.
     */
--- 3123,3129 ----
     *    the process safely to ask what it is.  Anyway, we'll
     *    add it when it gets the EXEC event.
     */
!   add_thread (pid_to_ptid (pid));		/* in thread.c */
  
    /* We can now set the child's ttrace event mask.
     */
*************** update_thread_state_after_attach (int pi
*** 4764,4770 ****
  	    }
  	}
  
!       add_thread (tid);		/* in thread.c */
      }
  
  #ifdef PARANOIA
--- 4764,4770 ----
  	    }
  	}
  
!       add_thread (pid_to_ptid (pid));		/* in thread.c */
      }
  
  #ifdef PARANOIA









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