From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30365 invoked by alias); 31 Mar 2002 15:36:40 -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 30357 invoked from network); 31 Mar 2002 15:36:39 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (213.93.115.180) by sources.redhat.com with SMTP; 31 Mar 2002 15:36:39 -0000 Received: from elgar.kettenis.dyndns.org (elgar.kettenis.dyndns.org [192.168.0.2]) by walton.kettenis.dyndns.org (8.11.6/8.11.6) with ESMTP id g2VFbGV00377; Sun, 31 Mar 2002 17:37:16 +0200 (CEST) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: (from kettenis@localhost) by elgar.kettenis.dyndns.org (8.11.6/8.11.6) id g2VFabb32137; Sun, 31 Mar 2002 17:36:37 +0200 (CEST) (envelope-from kettenis) Date: Sun, 31 Mar 2002 07:36:00 -0000 From: Mark Kettenis Message-Id: <200203311536.g2VFabb32137@elgar.kettenis.dyndns.org> To: kevinb@redhat.com CC: gdb-patches@sources.redhat.com In-reply-to: <1020328075921.ZM25566@localhost.localdomain> (message from Kevin Buettner on Thu, 28 Mar 2002 00:59:21 -0700) Subject: Re: [PATCH RFA] Propagate signals to non-clone PID on GNU/Linux References: <1020328075921.ZM25566@localhost.localdomain> X-SW-Source: 2002-03/txt/msg00626.txt.bz2 Hi Kevin, Hmm, there are a couple of things that make me doubt that this is the right solution. Please realize that lin-lwp.c:child_wait() is used for all Linux processes, not only multi-threaded programs. Therefore I'm not very enthousiastic about adding too much overhead to this function, including setting up and manipulating GDB's internal LWP bookkeeping. Actually, I think the patch in its current incarnation introduces a memory leak: when debugging normal programs, GDB will keep adding LWP's to its internal bookkeeping and never remove them. Unfortunately I can't think of another way to fix the bug with the "cloned" flag being set incorrectly for the LWP that GDB initially attached to. Perhaps the use of a static global variable is justified in this case? I'm a bit confused by the name you've chosen for set_up_clone_as_overall_process_id(), since it should never be called for a "cloned" process isn't it. Can you find a better name? I was also confused why you removed the code that "handles the overall process being stopped in another layer" in lin_lwp_attach_lwp(), but of course that is related to what you did to child_wait(). If we agree that using a global variable in child_wait() is the right approach, this bit is where the "cloned" flag should be set based on the setting of that global variable. Mark