From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21020 invoked by alias); 8 Aug 2008 21:50:10 -0000 Received: (qmail 21008 invoked by uid 22791); 8 Aug 2008 21:50:09 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 08 Aug 2008 21:49:34 +0000 Received: from brahms.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by brahms.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id m78LmEbW014805; Fri, 8 Aug 2008 23:48:14 +0200 (CEST) Received: (from kettenis@localhost) by brahms.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id m78LmEcf020275; Fri, 8 Aug 2008 23:48:14 +0200 (CEST) Date: Fri, 08 Aug 2008 21:50:00 -0000 Message-Id: <200808082148.m78LmEcf020275@brahms.sibelius.xs4all.nl> From: Mark Kettenis To: pedro@codesourcery.com CC: gdb-patches@sourceware.org In-reply-to: <200808080235.13509.pedro@codesourcery.com> (message from Pedro Alves on Fri, 8 Aug 2008 02:35:13 +0100) Subject: Re: [2/7] Add the attached-to thread in inf_ptrace_attach References: <200808080235.13509.pedro@codesourcery.com> 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-08/txt/msg00224.txt.bz2 > From: Pedro Alves > Date: Fri, 8 Aug 2008 02:35:13 +0100 > > This patch makes sure that the thread/task we attach to with ptrace > targets is added to GDB's thread table. Targets that extend > inf-ptrace (inf_ptrace_target) should then use thread_change_ptid > as soon as then have more lwp or tid info, instead of just setting > inferior_ptid. Targets that don't have a process_stratum target > overriding inf_ptrace_attach get it for free (BSD targets). > > This was tested together with the rest of the series on > x86_64-unknown-linux-gnu, i386-unknown-openbsd4.3, i386-unknown-freebsd6.0 > and i386-unknown-freebsd7.0. > > OK? Had the inf-ptrace.c bit in my tree too. So that's defenitely ok. I always get headaches when I look at linux-nat.c, so I'll trust you on that one. > 2008-08-08 Pedro Alves > > * inf-ptrace.c: Include "gdbthread.h". > (inf_ptrace_attach): Add the main thread here. > * linux-nat.c (linux_nat_attach): Don't add the main thread here. > Decorate the main thread id with the lwp id.