From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id VI+AI/5ZEmkpzzMAWB0awg (envelope-from ) for ; Mon, 10 Nov 2025 16:32:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1762810366; bh=1SZ1II19Digy3cU3IZCCEdRIMoMWMnX/+K+Cq1yh1AQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=FsrKtKc0ksAKOpgOdhFQiKvYCFlnW3NMUNl+LaruSLAr/lUniOzEXPEpiHLdcW5DD DVOJcqEC+8aX5J0KHAAB7iRTk1gt9E0Mue6PMTgy7D8gocK4LV440zu/VuBqy86iqh AXLZ2SgulOYQ50huenjkrUFQUsfJ3pyL/z2vFvyU= Received: by simark.ca (Postfix, from userid 112) id 7ED9E1E0B8; Mon, 10 Nov 2025 16:32:46 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 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_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham 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=SbEG2CkA; 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 E40B51E04C for ; Mon, 10 Nov 2025 16:32:45 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 779593858D2A for ; Mon, 10 Nov 2025 21:32:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 779593858D2A 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=SbEG2CkA Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id AD81E3858D1E; Mon, 10 Nov 2025 21:29:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AD81E3858D1E 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 AD81E3858D1E 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=1762810174; cv=none; b=HB1Zo/aaX/i+gce+F0J0BK9ByvK9EtP1aCfQqFQn+0Ncv+KTqiT9rttNm/8f9cMQ9nUwrtwtA3VP7pjb2fzjGdOK+Hmg7QTWdKDSRSP9h57+dx8EXDCYyJJzS2I9rqv8pRDeRhLDy0kGWbfxWMabJXbqDN0otukHWpSH15iReVg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1762810174; c=relaxed/simple; bh=1SZ1II19Digy3cU3IZCCEdRIMoMWMnX/+K+Cq1yh1AQ=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=HuRQlsS7QQoqQF7iRspamaoqSsKfPNFnaOA/V4eDRFfFv1KIqEmaGEki77AJbjTf0lOTJAID6IcDdQgm72j6UcSDW3wpqi/pJ+CgRfJWnUa1E/qhu+JyRqsdE7u0ynPvex8p6z1qtJaamZVqnDui2+dC2iZsqnRAGelKnQzOBAc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AD81E3858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1762810174; bh=1SZ1II19Digy3cU3IZCCEdRIMoMWMnX/+K+Cq1yh1AQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=SbEG2CkAnxq+rsgWs7kegif7U7OJcqayYRaEOmLsPyXd6a/xWZbk26Xip4tY1klKP /nF1yLTkbfx5B+abc89q87vdQydOG2s32a6iKzEL1jCu4qgY2+IuLg/97VzUJFbWfT g3VNOdJgJEM0pqPq6WFZQuIMlfi1nblWxUVWltcI= Received: by simark.ca (Postfix) id 325C41E04C; Mon, 10 Nov 2025 16:29:34 -0500 (EST) Message-ID: Date: Mon, 10 Nov 2025 16:29:33 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3] gdb/hppa: guess g packet size To: Sven Schnelle , gdb-patches@sourceware.org Cc: Helge Deller , John David Anglin , binutils@sourceware.org References: <20251110210717.152087-1-svens@stackframe.org> Content-Language: fr From: Simon Marchi In-Reply-To: <20251110210717.152087-1-svens@stackframe.org> 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 > @@ -2991,15 +3014,32 @@ hppa_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) > = gdbarch_alloc (&info, gdbarch_tdep_up (new hppa_gdbarch_tdep)); > hppa_gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); > > - /* Determine from the bfd_arch_info structure if we are dealing with > - a 32 or 64 bits architecture. If the bfd_arch_info is not available, > - then default to a 32bit machine. */ > - if (info.bfd_arch_info != NULL) > - tdep->bytes_per_address = > - info.bfd_arch_info->bits_per_address / info.bfd_arch_info->bits_per_byte; > + /* Determine from the target description if we are dealing with > + a 32 or 64 bits architecture. If the target description is not > + available, then check whether bfd_arch_info could be used. > + Otherwise default to a 32bit machine. > + */ > + if (info.target_desc != nullptr) > + { > + if (tdesc_property (info.target_desc, PROPERTY_GP64) != nullptr) > + tdep->bytes_per_address = 8; > + else if (tdesc_property (info.target_desc, PROPERTY_GP32) != nullptr) > + tdep->bytes_per_address = 4; > + else > + { > + warning (_("target returned a target description this gdb doesn't " > + "support for the HP/PA architecture")); Good idea to put out a warning. I would suggesting some minor changes to the message: warning (_("The target returned a target description but this gdb " "doesn't support target descriptions for the HP/PA "architecture")); Just thinking out loud: it would actually be nice to have this warning for all architectures that don't support target descriptions, if there was a way to put it at a single common place. Other than that, the patch looks fine. Approved-By: Simon Marchi Do you have push access or would you like me to push the patch on your behalf (with the modification proposed above)? Simon