From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15575 invoked by alias); 19 Dec 2001 18:40:04 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 15333 invoked from network); 19 Dec 2001 18:38:46 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 19 Dec 2001 18:38:46 -0000 Received: from porcupine.cygnus.com (cse.cygnus.com [205.180.230.236]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id KAA29750 for ; Wed, 19 Dec 2001 10:38:43 -0800 (PST) Received: from porcupine.cygnus.com (law@localhost) by porcupine.cygnus.com (8.11.6/8.11.6) with ESMTP id fBJIcEL21995 for ; Wed, 19 Dec 2001 11:38:14 -0700 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 To: gdb-patches@sources.redhat.com Reply-to: law@redhat.com From: law@redhat.com Subject: infttrace vs add_thread Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 19 Dec 2001 10:40:00 -0000 Message-ID: <21994.1008787094@porcupine.cygnus.com> X-SW-Source: 2001-12/txt/msg00472.txt.bz2 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