From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27288 invoked by alias); 8 Mar 2011 18:02:50 -0000 Received: (qmail 27273 invoked by uid 22791); 8 Mar 2011 18:02:45 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 08 Mar 2011 18:02:39 +0000 Received: (qmail 20208 invoked from network); 8 Mar 2011 18:02:37 -0000 Received: from unknown (HELO scottsdale.localnet) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 8 Mar 2011 18:02:37 -0000 From: Pedro Alves To: Tom Tromey Subject: Re: RFC: lazily call save_current_space_and_thread Date: Tue, 08 Mar 2011 18:15:00 -0000 User-Agent: KMail/1.13.5 (Linux/2.6.35-27-generic; KDE/4.6.1; x86_64; ; ) Cc: gdb-patches@sourceware.org, Jan Kratochvil References: <201103081723.11974.pedro@codesourcery.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201103081802.35770.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: 2011-03/txt/msg00549.txt.bz2 On Tuesday 08 March 2011 17:49:29, Tom Tromey wrote: > Pedro> I'm guessing you're trying all-stop. In non-stop, I _think_ > Pedro> you'll much more rarely see a NULL selected frame here. > > Nope, I do this before my test: > > set target-async on > set schedule-multiple on > set pagination off > set detach-on-fork off > set non-stop on Okay. In any case, what I was aluding to, is that in non-stop mode gdb is making sure the user selected frame is constant between events (fetch_inferior_event), so in that case, there's a selected frame to restore back to. But thinking a bit more, that obviously doesn't matter because if the user had a frame selected, then the debug info for that frame has already been read anyway, and there's nothing to optimize. > I can't say that I understand everything that happens in this mode. > > "run" appears to work in the background, which is mysterious to me. Hmm. It shouldn't. Well, behind the scenes it does run asynchronously, but only "run&" should work in the background, from the user's perpective. Boo, something's seriously broken :-/ : [Thread debugging using libthread_db enabled] process 2857 is executing new program: /usr/bin/iconv Error in re-setting breakpoint 1: Cannot access memory at address 0x45e22a Error in re-setting breakpoint 2: Cannot access memory at address 0x4e2e5a warning: Error removing breakpoint 1 warning: Error removing breakpoint 2 warning: Error removing breakpoint 1 warning: Error removing breakpoint 2 warning: Error removing breakpoint 1 warning: Error removing breakpoint 2 warning: Error removing breakpoint 1 warning: Error removing breakpoint 2 warning: Error removing breakpoint 1 ... I suspect it's related to spawning iconv (or rather, that's triggering some bug). > > And, if I C-c gdb, I just get "Quit." back, That just means you have the prompt, and the inferior is either backgrounded, or not running at all. To interrupt the target in async/non-stop modes, we use "interrupt", not C-c. > and then gdb is in a weird > state (I can't "continue" any inferior and if I try "run" I get an > internal error). > > I am planning to debug these next; but if you know what is going on > already... Can't say I do. -- Pedro Alves