From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19465 invoked by alias); 16 Feb 2012 14:40:39 -0000 Received: (qmail 19404 invoked by uid 22791); 16 Feb 2012 14:40:37 -0000 X-SWARE-Spam-Status: No, hits=-7.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 16 Feb 2012 14:40:13 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q1GEeC2T014156 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 16 Feb 2012 09:40:12 -0500 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q1GEeCvP009315; Thu, 16 Feb 2012 09:40:12 -0500 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id q1GEeBvM020215; Thu, 16 Feb 2012 09:40:11 -0500 From: Tom Tromey To: Pedro Alves Cc: Jan Kratochvil , gdb-patches@sourceware.org Subject: Re: RFC: fix crash when inferior exits during "continue" References: <20120210144040.GA28038@host2.jankratochvil.net> <87ty2ya1ys.fsf@fleche.redhat.com> <20120214134417.GA6730@redhat.com> <4F3A6D51.5010904@redhat.com> <87d39fn9cq.fsf@fleche.redhat.com> <4F3CEC0E.4070603@redhat.com> Date: Thu, 16 Feb 2012 14:42:00 -0000 In-Reply-To: <4F3CEC0E.4070603@redhat.com> (Pedro Alves's message of "Thu, 16 Feb 2012 11:44:14 +0000") Message-ID: <87lio2kfjo.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: 2012-02/txt/msg00327.txt.bz2 >>>>> "Pedro" == Pedro Alves writes: Tom> This makes sense to me if the user entered a background command. Tom> But why not switch if the last command was a foreground command? Pedro> Yes, agreed. The lame reason is that the original non-stop work didn't Pedro> care that much about the CLI (and there's no foreground in MI), and I Pedro> have an old TODO item for that, that I never got around to. :-P I'll file a bug. >> +#include Pedro> Doesn't look necessary. Oops, I missed this comment before check-in. I'll fix it now. >> static void >> @@ -1095,6 +1096,8 @@ do_restore_current_thread_cleanup (void *arg) >> set_current_inferior (find_inferior_id (old->inf_id)); >> } >> >> + current_inferior ()->removable = old->was_removable; Pedro> This is unnecessary. restore_current_thread_cleanup_dtor Pedro> is called when either you run or discard the cleanup. I did manage to make this change before committing. Tom