From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28455 invoked by alias); 15 Jul 2014 21:03:59 -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 28446 invoked by uid 89); 15 Jul 2014 21:03:58 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 15 Jul 2014 21:03:57 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s6FL3rrx020571 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 15 Jul 2014 17:03:53 -0400 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s6FL3pFB020955; Tue, 15 Jul 2014 17:03:52 -0400 Message-ID: <53C59737.7030703@redhat.com> Date: Wed, 16 Jul 2014 02:02:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Pedro Alves , Simon Marchi , gdb-patches@sourceware.org Subject: Re: [PATCH v2 2/2] Only leave dprintf inserted if it is marked as persistent (PR breakpoints/17012) References: <1404760664-17289-1-git-send-email-simon.marchi@ericsson.com> <1404760664-17289-2-git-send-email-simon.marchi@ericsson.com> <53C5642E.4010103@redhat.com> In-Reply-To: <53C5642E.4010103@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2014-07/txt/msg00407.txt.bz2 On 07/15/2014 06:26 PM, Pedro Alves wrote: > But ... most importantly. How do we end up with 'persist' set > on a call-style dprintf, given: > > static void > build_target_command_list (struct bp_location *bl) > { > ... > /* For now, limit to agent-style dprintf breakpoints. */ > if (dprintf_style != dprintf_style_agent) > return; > > I'm confused, as you say the test fails now, but nowhere in the > test are you setting the style to agent. I think I'm missing > something. :-) > Yeah, I was missing dinner... :-) Of course, the point is that indeed, for dprintf style != agent, 'persist' is not set, and those are the locations we want to remove. Silly me. BTW, I think it'd be good to make the test exercise all dprintf styles, as all types are affected, and also "set disconnected-dprintf off/on", to make "agent" style affected. With disconnected on, the agent style dprintf will be persistent when testing against gdbserver (extended-remote), but we should likewise be able to detach and reattach back. Something along the lines of: foreach always_inserted { "off" "on" } { foreach style { "gdb" "call" "agent" } { foreach disconnected { "on" "off" } { test $always_inserted $style $disconnected } } } -- Pedro Alves