From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 121695 invoked by alias); 24 Aug 2018 06:11:40 -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 121378 invoked by uid 89); 24 Aug 2018 06:11:39 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:2021, cares X-HELO: jocasta.intra Received: from de.cellform.com (HELO jocasta.intra) (88.217.224.109) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 24 Aug 2018 06:11:38 +0000 Received: from jocasta.intra (localhost [127.0.0.1]) by jocasta.intra (8.15.2/8.15.2/Debian-8) with ESMTPS id w7O6BQFR024230 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 24 Aug 2018 08:11:26 +0200 Received: (from john@localhost) by jocasta.intra (8.15.2/8.15.2/Submit) id w7O6BPdM024229; Fri, 24 Aug 2018 08:11:25 +0200 Date: Fri, 24 Aug 2018 06:11:00 -0000 From: John Darrington To: Simon Marchi Cc: John Darrington , gdb-patches@sourceware.org Subject: Re: [PATCH 1/3] gdb: Added builtin types for 24 bit integers. Message-ID: <20180824061125.7vjvlopdx4bstg4l@jocasta.intra> References: <20180823173526.26144-1-john@darrington.wattle.id.au> <7b7853c6462d8806bc4a2a743330a382@polymtl.ca> <20180823200349.gxeuad3ms3c2apei@jocasta.intra> <603c98bc68bec04acb84d809c838abb0@polymtl.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <603c98bc68bec04acb84d809c838abb0@polymtl.ca> User-Agent: NeoMutt/20170113 (1.7.2) X-SW-Source: 2018-08/txt/msg00589.txt.bz2 On Thu, Aug 23, 2018 at 04:35:25PM -0400, Simon Marchi wrote: It is clear now, but somebody doing a git blame to know why 24-bit integer types were added would only find the patch that adds them by itself and wonder who uses that. A little message like =20=20=20=20=20 This patch adds 24-bit integer types, used when debugging on the S12Z architecture (added by a later patch in this series). =20=20=20=20=20 clears that up. That might looks a bit silly, but I think it helps in the long run. I fully agree with you. I've worked on other projects however had a different opinion - they insisted that the checkin comment NOT contain any rationale for the change, instead it should just summarize what changed. I find that rather pointless but anyway .... =20=20=20=20=20 > It seems that up till now there has been no 24 bit targets, so the > other > two patches as some necessary things to make that possible. =20=20=20=20=20 Thanks. Coming back to the code of the patch, I was wondering if these 24-bit types are useful or even relevant for any other architecture. There most certainly are plenty of 24 bit architectures especially in the= =20 embedded world - just apparently none that gdb currently supports :( Would it work if you only defined the types for s12z architectures, storing the reference in the gdbarch_tdep object? My first reaction is that it probably *could* be made to work, but not=20 in an elegant fashion. Somehow I'd have to avoid that gdb ever calls the= =20 read_encoded_value function.=20 I do concede that adding DW_EH_PE_udata3 might be problematic since it's not part of the dwarf standard. An alternative might be to rework the read_encoded_value function to not rely on the dwarf enums (all it really cares about is the size of the target's address space. Regards John --=20 Avoid eavesdropping. Send strong encrypted email. PGP Public key ID: 1024D/2DE827B3=20 fingerprint =3D 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3 See http://sks-keyservers.net or any PGP keyserver for public key.