From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15581 invoked by alias); 22 Mar 2013 16:58:19 -0000 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 Received: (qmail 15563 invoked by uid 89); 22 Mar 2013 16:58:12 -0000 X-Spam-SWARE-Status: No, score=-8.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 22 Mar 2013 16:58:09 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r2MGw4sp005245 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 22 Mar 2013 12:58:04 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r2MGw1W7016892; Fri, 22 Mar 2013 12:58:02 -0400 Message-ID: <514C8D99.2060809@redhat.com> Date: Fri, 22 Mar 2013 19:28:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 MIME-Version: 1.0 To: Jan Kratochvil CC: Yao Qi , gdb-patches@sourceware.org, "Metzger, Markus T" Subject: Re: [patch] Fix remote.c incorrectly using pop_target (wrt btrace) References: <20130311172836.GA22575@host2.jankratochvil.net> <513EFD81.6050401@codesourcery.com> <20130315195451.GB19841@host2.jankratochvil.net> In-Reply-To: <20130315195451.GB19841@host2.jankratochvil.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-03/txt/msg00856.txt.bz2 On 03/15/2013 07:54 PM, Jan Kratochvil wrote: > gdb/ > 2013-03-15 Jan Kratochvil > > * remote.c (remote_unpush_target): New function. > (remote_open_1): Remove two pop_target calls, update one comment, add > comment to target_preopen call. Replace pop_target call by > remote_unpush_target call. > (interrupt_query, readchar, getpkt_or_notif_sane_1): Replace > pop_target calls by remote_unpush_target calls. > Thanks. I think this is fine. I notice that some targets, like spu-multiarch.c or dec-thread.c don't seem to be very prepared to be brute-force deactivated. E.g., those targets (and linux-thread-db.c and bsd-uthread.c too), probably more) are deactivated when symbols or shared libraries are unloaded, and their to_close methods don't take care of cleaning up the target's variables / local state. A similar scenario that doesn't involve remote, is when going from 'threaded core debugging' -> 'non-threaded core debugging'. But since target_pre_inferior discards the DSOs of the current inferior, and these targets are generally not multi-inferior aware, I guess things end up alright. This is very much a preexisting wart. I suspect we'll end up getting back to this at some not-so-distant point. :-) -- Pedro Alves