From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21710 invoked by alias); 23 Oct 2008 19:55:40 -0000 Received: (qmail 21701 invoked by uid 22791); 23 Oct 2008 19:55:39 -0000 X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 23 Oct 2008 19:55:00 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Kt6Gl-0003T7-KB for gdb-patches@sources.redhat.com; Thu, 23 Oct 2008 19:54:55 +0000 Received: from entropy.qnx.com ([209.226.137.107]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 23 Oct 2008 19:54:55 +0000 Received: from aristovski by entropy.qnx.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 23 Oct 2008 19:54:55 +0000 To: gdb-patches@sources.redhat.com From: Aleksandar Ristovski Subject: [patch] nto-procfs.c form proper ptid and thread list. Date: Thu, 23 Oct 2008 19:55:00 -0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030502000602090700080503" User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-10/txt/msg00585.txt.bz2 This is a multi-part message in MIME format. --------------030502000602090700080503 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 335 Hello, This patch will make gdb actually work on nto. Very small patch incorporating what Pedro suggested a few months ago (sorry for the delay). Thanks, Aleksandar Ristovski QNX Software Systems ChangeLog: * nto-procfs.c (do_attach): Form proper ptid including pid and tid. (procfs_create_inferior): Fetch list of threads. --------------030502000602090700080503 Content-Type: text/x-patch; name="nto-procfs-20081023.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="nto-procfs-20081023.diff" Content-length: 843 Index: gdb/nto-procfs.c =================================================================== RCS file: /cvs/src/src/gdb/nto-procfs.c,v retrieving revision 1.34 diff -u -p -r1.34 nto-procfs.c --- gdb/nto-procfs.c 23 Oct 2008 17:53:17 -0000 1.34 +++ gdb/nto-procfs.c 23 Oct 2008 19:47:17 -0000 @@ -580,7 +580,7 @@ do_attach (ptid_t ptid) && status.flags & _DEBUG_FLAG_STOPPED) SignalKill (nto_node (), PIDGET (ptid), 0, SIGCONT, 0, 0); nto_init_solib_absolute_prefix (); - return ptid; + return ptid_build (PIDGET (ptid), 0, status.tid); } /* Ask the user what to do when an interrupt is received. */ @@ -1085,6 +1085,7 @@ procfs_create_inferior (char *exec_file, close (fds[2]); inferior_ptid = do_attach (pid_to_ptid (pid)); + procfs_find_new_threads (); inf = add_inferior (pid); inf->attach_flag = 0; --------------030502000602090700080503--