From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gateway34.websitewelcome.com (gateway34.websitewelcome.com [192.185.149.101]) by sourceware.org (Postfix) with ESMTPS id C7C23385781A for ; Tue, 16 Nov 2021 20:18:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C7C23385781A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=tromey.com Received: from cm17.websitewelcome.com (cm17.websitewelcome.com [100.42.49.20]) by gateway34.websitewelcome.com (Postfix) with ESMTP id 09222B53C1 for ; Tue, 16 Nov 2021 14:18:22 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id n4uLm9hQKgm2Un4uMmjcUU; Tue, 16 Nov 2021 14:18:22 -0600 X-Authority-Reason: nr=8 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:References :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=o4BxpWW91D5inHz+ngmtQAFWJgY2bAydIHboV93lqik=; b=OBhn+FsRSqqKaBXiU/firvs8GL Ur8yO8z3mvCAS7ddF5ieM3r+x/2I5KMGnHaABgXWyJxJXuhrg/9gkvHfZCU9FGalt3i0uQ5gdTfDb Fkdm/mpMb8Ox9fgEqSHhiW8Yn; Received: from 97-122-68-246.hlrn.qwest.net ([97.122.68.246]:54160 helo=murgatroyd) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mn4uL-0044pr-Jl; Tue, 16 Nov 2021 13:18:21 -0700 From: Tom Tromey To: Kevin Buettner via Gdb-patches Cc: Simon Marchi , Kevin Buettner Subject: Re: [PATCH 1/2] Fix PR 28308 - dprintf breakpoints not working when run from script References: <20211002010054.1546736-1-kevinb@redhat.com> <20211002010054.1546736-2-kevinb@redhat.com> <20211109203426.0656c9ea@f35-m3> X-Attribution: Tom Date: Tue, 16 Nov 2021 13:18:20 -0700 In-Reply-To: <20211109203426.0656c9ea@f35-m3> (Kevin Buettner via Gdb-patches's message of "Tue, 9 Nov 2021 20:34:26 -0700") Message-ID: <87pmqzetwz.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.68.246 X-Source-L: No X-Exim-ID: 1mn4uL-0044pr-Jl X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-68-246.hlrn.qwest.net (murgatroyd) [97.122.68.246]:54160 X-Source-Auth: tom+tromey.com X-Email-Count: 3 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3022.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_SBL_CSS, SPF_HELO_PASS, SPF_NEUTRAL, TXREP, URIBL_CSS_A autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2021 20:18:31 -0000 >>>>> "Kevin" == Kevin Buettner via Gdb-patches writes: Kevin> Another way of implementing it would have been to associate three Kevin> commands with a dprintf breakpoint: Kevin> quiet Kevin> printf ... / call (void) printf (...) / agent-print ... Kevin> continue Kevin> This is basically what you'd use as a breakpoint command list if GDB Kevin> didn't have the dprintf facility. The virtue of this approach is that Kevin> it could use the existing breakpoint w/ associated command logic Kevin> without having to introduce some of the stuff that's only used by the Kevin> dprintf mechanism. This current bug either wouldn't have happened or, Kevin> if it did, would have affected the rest of the breakpoint/command Kevin> functionality as well. Kevin> I think it's probable that this approach (that I'm suggesting) was Kevin> considered but was found lacking in some way. If so, I'd guess that Kevin> either there's some major "gotcha" which I have considered or else Kevin> it's too slow. The problem with the above approach is that it interferes with other gdb commands. For example, if you step onto a dprintf spot, this may cause gdb to resume the inferior rather than stop. Or, if you 'next', and the code hits a dprintf, the resulting 'continue' will cause gdb to forget it is stepping. Tom