From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2709 invoked by alias); 2 May 2008 13:24:00 -0000 Received: (qmail 2700 invoked by uid 22791); 2 May 2008 13:24:00 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 02 May 2008 13:23:40 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 54F4F983EB; Fri, 2 May 2008 13:23:38 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 3390B983D6; Fri, 2 May 2008 13:23:38 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1JrvEf-0007g1-FM; Fri, 02 May 2008 09:23:37 -0400 Date: Fri, 02 May 2008 13:24:00 -0000 From: Daniel Jacobowitz To: Pedro Alves , Vladimir Prus Cc: gdb-patches@sourceware.org Subject: Re: [RFA] Make continuations per-thread. Message-ID: <20080502132337.GA29202@caradoc.them.org> Mail-Followup-To: Pedro Alves , Vladimir Prus , gdb-patches@sourceware.org References: <200804242045.39246.vladimir@codesourcery.com> <20080502030012.GB28580@caradoc.them.org> <200805021234.12472.pedro@codesourcery.com> <200805021551.11725.vladimir@codesourcery.com> <200804242045.39246.vladimir@codesourcery.com> <20080502030012.GB28580@caradoc.them.org> <200805021234.12472.pedro@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200805021551.11725.vladimir@codesourcery.com> <200805021234.12472.pedro@codesourcery.com> User-Agent: Mutt/1.5.17 (2007-12-11) 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-05/txt/msg00070.txt.bz2 On Fri, May 02, 2008 at 12:34:11PM +0100, Pedro Alves wrote: > to not make it centralized. This is one of the things that gets much > better looking when we switch completelly to always-a-thread, and > get rid of context-switching. I'm introducing another variable, instead of So maybe we should do that in the FSF tree before the attached patch - is that feasible? On Fri, May 02, 2008 at 03:51:10PM +0400, Vladimir Prus wrote: > This is only for intermediate continations. For ordinary continuations, not > running them when we hit a breakpoint in another thread is desirable. Why should > a breakpoint in some other thread abort "finish"? Note that in current gdb, > hitting a breakpoint in unrelated thread does not abort "next" -- say we > did next, inserted step resume breakpoint, and then hit breakpoint in some other > thread. Then, the step resume breakpoint will not be removed. If we decide to > continue the program, we'll eventually hit it. > > I don't see any problem with continuations been kept for a given thread > for a long time. It's not an unbounded amount of continuations -- if we get an > event in this thread, continuation will run, and if we don't get an event, > we won't add any futher continuations. In non-stop mode, the continuation will run the first time that thread stops because threads only stop when there is an event. But in all-stop mode the thread will be stopped with its continuations not yet run. [Current thread is 1] finish [Switching to thread 2] Breakpoint at.... thread 1 finish Now thread 1 has two finish continuations and they're at different threads... is it going to do something sensible? What's sensible? -- Daniel Jacobowitz CodeSourcery