From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 6FF5F3858C5E for ; Mon, 27 Mar 2023 14:47:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6FF5F3858C5E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca Received: from [192.168.0.101] (modemcable194.137-20-96.mc.videotron.ca [96.20.137.194]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id AEE2A1E0D2; Mon, 27 Mar 2023 10:47:14 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1679928435; bh=UyM7I19QVKX92DdAPFeF6Uh9jyne0jB1ogj30o/3sD0=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=xVvNxAB8fqD0qqpGlSw+D0zuPSg7D3ZxygasU3DYc5GTxsjbYiQLdzrNW8j07uVoD sfEjR7RHXWa/RmUt5EsxZ98J2NVyOrgLnOHQxnJWiyb+49qs0d29nlMvVN9vAVOftK vvUKw1RBAL783ymATOVo1Mc9dKvyYAcUrCt4Fl08= Message-ID: Date: Mon, 27 Mar 2023 10:47:13 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH v3 1/1] gdb, breakpoint: add breakpoint location debugging logs Content-Language: fr To: Christina Schimpe , gdb-patches@sourceware.org Cc: eliz@gnu.org, blarsen@redhat.com References: <20230327091235.521536-1-christina.schimpe@intel.com> <20230327091235.521536-2-christina.schimpe@intel.com> From: Simon Marchi In-Reply-To: <20230327091235.521536-2-christina.schimpe@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > @@ -3908,6 +3951,13 @@ detach_breakpoints (ptid_t ptid) > static int > remove_breakpoint_1 (struct bp_location *bl, enum remove_bp_reason reason) > { > + breakpoint_debug_printf ("bp_location (%s) due to %s at address %s %s", > + host_address_to_string (bl), > + (reason == REMOVE_BREAKPOINT > + ? "regular remove" : "detach"), Another little nit: for consistency, let's add a remove_bp_reason_str function to convert an enum remove_bp_reason to a string (same as you did for ugll_insert_mode). This way we'll get an assertion failure if we add a new enumerator and for got to handle it in the switch. And for all functions of this kind, I would be tempted to use DIAGNOSTIC_ERROR_SWITCH, like we have in the target_waitkind_str), so that compilers that support it can warn if we miss an enumerator in the switch. Simon