From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 1Z9/OogscWjO2TEAWB0awg (envelope-from ) for ; Fri, 11 Jul 2025 11:23:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1752247432; bh=Dl9SuzkjeyKqZRycTnuzpoNjVJgPQKcH0ZpIzxa4zm0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=AH12FC5owRFhNbFqZJi+r+cCJBAA6msY1BRA/RGFJ+G3lgIXFatlhJO4tZ/ecqzlJ TThHuSjBroMwBD5pOlw6wTgz1dMIVf1QPbtuGAHEcerbaL+aiAADd5c2NiBZhDw1lL 9gyjTVJBf+WQKzw19oCaMnGgw4gnat7kOc+SosOI= Received: by simark.ca (Postfix, from userid 112) id DB22D1E11C; Fri, 11 Jul 2025 11:23:52 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-10.1 required=5.0 tests=ARC_SIGNED,ARC_VALID, BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_CERTIFIED, RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE autolearn=unavailable autolearn_force=no version=4.0.1 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=sp5yhVIt; dkim=pass (1024-bit key) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=peJ/WdT0; dkim-atps=neutral Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 5D3A01E089 for ; Fri, 11 Jul 2025 11:23:52 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D4AC4385AC29 for ; Fri, 11 Jul 2025 15:23:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D4AC4385AC29 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=sp5yhVIt; dkim=pass (1024-bit key) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=peJ/WdT0 Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id F06D63857738 for ; Fri, 11 Jul 2025 15:22:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F06D63857738 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org F06D63857738 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1752247369; cv=none; b=N61pbWADjyjCN18Pa9tr2sZXq9osNa7H/+Ab58AbY5ifGfJaXR1C7z94XbYT3wI74gGUVyqTUV3Vmn8DtaXx+HsoL0wdixVC4nrOfB17YUfo1ZV8dEj+xMdZzXuTFV+51wnjjrM5z7iptdeviTHSMIte2l+Ls4/BahEExlPwSD0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1752247369; c=relaxed/simple; bh=Dl9SuzkjeyKqZRycTnuzpoNjVJgPQKcH0ZpIzxa4zm0=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:MIME-Version: Subject:To:From; b=qPwkZPiw1REOVawK9DOc5ug3F17KR5c3yqHgFFNFGBeqQd5H+l0wi0cKuEDKSoXrvBoe76PxCZc+afrcrJ5e05WrVse9Rm5aOMATVj9ahfMG73416M4yZZ7joo6sfJpRfx/Ld5vUCEPX5PnzgXywvDWOK1OaUXja82e9gW9mso8= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F06D63857738 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1752247368; bh=Dl9SuzkjeyKqZRycTnuzpoNjVJgPQKcH0ZpIzxa4zm0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=sp5yhVItUzh1oLkvK0y0nJUkDDqfR4U1gFz1OwCcnnhMHiRqrkGdURwo/MvG3jdSR wiVgOmbh9H3Kpr1N4vm4mt0pOfTwqzb/5gXh8u+wVxaO9YhrdfjdD58kfkOnSoJnim ba+HjLAdRB2rNEUt6aX4Qwsu5e5ShA8JFkNUh5X4= Received: by simark.ca (Postfix, from userid 112) id 3F5CC1E128; Fri, 11 Jul 2025 11:22:48 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1752247364; bh=Dl9SuzkjeyKqZRycTnuzpoNjVJgPQKcH0ZpIzxa4zm0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=peJ/WdT0lqj8rGIeq4bFiVFY0u/lEnES4KQEUO546GmCqpVSR1zFqebQLu4qBeNuh yM8hYlGksRNIY0jZMSTYYsf86uwoOpy779v4ggnkEEEvhNOCROc5sN9Cv0BR/4JWOX YJgcgIUgFo5FiU3mWd2TnUsT003AMvbXABeJqggI= Received: from [10.15.249.187] (unknown [204.48.93.245]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id D1A8B1E089; Fri, 11 Jul 2025 11:22:43 -0400 (EDT) Message-ID: <615bf390-6aca-4783-a142-2c07c6aeec95@simark.ca> Date: Fri, 11 Jul 2025 11:22:42 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/1] gdb, breakpoint: use breakpoint_debug_printf To: "Gerlicher, Klaus" , Kevin Buettner , Tom Tromey , Pedro Alves Cc: "gdb-patches@sourceware.org" References: <20250708132123.561491-1-klaus.gerlicher@intel.com> <87zfddcgr9.fsf@tromey.com> <20250709195857.5f77b521@f41-zbm-amd> Content-Language: fr From: Simon Marchi In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 7/10/25 4:43 AM, Gerlicher, Klaus wrote: > Hi, > > Thanks for the quick response. I see, we need to include Pedro then I guess. It's > not terribly important, I was just adding some things to breakpoint for our purposes > and I hit this oddity. > > +Pedro > > Thanks > Klaus I agree with Tom, it's not just the file that dictates which "debug print" function to use, it's also what the code does. You have to ask yourself, when would I want to see this debug print. This is how I see it: - "infrun" is about GDB controlling the threads, handling target events, resuming threads, stopping threads, etc. - "breakpoint" is about the actions of inserting or removing breakpoints, computing the locations of breakpoints, etc. You have to ask yourself, when would you like to see each statement. The code in bpstat_check_breakpoint_conditions, for instance, is about evaluating a breakpoint condition after a thread has hit it. I think these debug prints are useful to have when debugging infrun issues, when you ask yourself "why did GDB decide to stop/not stop this thread". It's possible that some of these infrun prints should be breakpoint prints, but it needs to be more thought out. I see that breakpoint_debug_printf is only used at 5 spots, which is surprising, since the breakpoint machinery is rather complex and core to GDB. It is relatively recent (2023), so it perhaps just means we need to add more of them, when we debug issues. Simon