From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19273 invoked by alias); 16 Apr 2009 19:15:36 -0000 Received: (qmail 19265 invoked by uid 22791); 16 Apr 2009 19:15:35 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 16 Apr 2009 19:15:28 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n3GJDOcp010505; Thu, 16 Apr 2009 15:13:24 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n3GJDNsv009760; Thu, 16 Apr 2009 15:13:24 -0400 Received: from opsy.redhat.com (vpn-12-173.rdu.redhat.com [10.11.12.173]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n3GJDMfc021958; Thu, 16 Apr 2009 15:13:23 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id 4BE5750830B; Thu, 16 Apr 2009 13:13:22 -0600 (MDT) To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: Add base linux native multi-process support. References: <200904072056.04727.pedro@codesourcery.com> From: Tom Tromey Reply-To: tromey@redhat.com Date: Thu, 16 Apr 2009 19:15:00 -0000 In-Reply-To: <200904072056.04727.pedro@codesourcery.com> (Pedro Alves's message of "Tue\, 7 Apr 2009 20\:56\:04 +0100") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2009-04/txt/msg00384.txt.bz2 Pedro> This patch adds base multi-process support to linux native GDB. Awesome. Pedro> I've left in a temporary global `linux_multi_process', and an Pedro> undocumented command "set maint linux-multiprocess", for convenience Pedro> when working on adding multi-exec support, and testing a multiprocess Pedro> GDB. This has samed me quite some recompile time. Let me know if Pedro> you think this is a bad idea. I think this approach is fine. Pedro> /* Call CALLBACK with its second argument set to DATA for every LWP in Pedro> the list. If CALLBACK returns 1 for a particular LWP, return a Pedro> pointer to the structure describing that LWP immediately. Pedro> Otherwise return NULL. */ Pedro> struct lwp_info * Pedro> -iterate_over_lwps (int (*callback) (struct lwp_info *, void *), void *data) Pedro> +iterate_over_lwps (ptid_t filter, Pedro> + int (*callback) (struct lwp_info *, void *), Pedro> + void *data) Please update the function's comment to explain the new parameter. Pedro> Index: src/gdb/linux-thread-db.c After reading Paul's patch and then yours, it occurs to me that the thread database .so dlopen handle and various function pointers will have to be per-inferior. Tom