From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25670 invoked by alias); 15 Jan 2009 14:42:47 -0000 Received: (qmail 25658 invoked by uid 22791); 15 Jan 2009 14:42:46 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 15 Jan 2009 14:42:11 +0000 Received: (qmail 8921 invoked from network); 15 Jan 2009 14:42:09 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 15 Jan 2009 14:42:09 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: Re: [BUG] Quit and "(running)" problem Date: Thu, 15 Jan 2009 14:42:00 -0000 User-Agent: KMail/1.9.10 Cc: "Pierre Muller" References: <000001c9770e$5579c160$006d4420$@u-strasbg.fr> In-Reply-To: <000001c9770e$5579c160$006d4420$@u-strasbg.fr> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200901151442.29831.pedro@codesourcery.com> 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: 2009-01/txt/msg00354.txt.bz2 On Thursday 15 January 2009 12:39:39, Pierre Muller wrote: > I have troubles with CVS HEAD gdb on cygwin, > related to the "(running)" state. But I don't think that > this problem is windows specific... It isn't. > (top-gdb) set height 1 > (top-gdb) n > ---Type to continue, or q to quit---q > Quit This is one of the reasons I tell people that a pagination request is an easy way to get exceptions in unexpected places. In this case, this is comming from normal_stop, I believe. As a general guideline, we should try to do *_filtered output only after having done all the side effects we wanted. > (top-gdb) set height 80 > (top-gdb) inf thr > 2 Thread 3768.0xb0 (running) > * 1 Thread 3768.0xd98 (running) > (top-gdb) cont > Continuing. > Cannot execute this command while the selected thread is running. > (top-gdb) > > The problem is the set_running function > introduced for the non-stop mode probably: > the fact on Quitting at the --Type question > bypasses the > set_running(..,0) > (I discovered that by adding an printout on > each set_running call) > and thus leaves gdb beleaaving that > the threads are running while non-stop mode is > not even implemented yet on cygwin native gdb! Yep. > This needs a fix! Believe it or not, I zapped this morning a source tree by mistake where I had most of the fix for this. :-( I'm working on it again. -- Pedro Alves