From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 09 May 2024 12:15:23 +0200 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1s50o7-00514w-1r for lore@lore.pengutronix.de; Thu, 09 May 2024 12:15:23 +0200 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1s50o6-0003M4-UY; Thu, 09 May 2024 12:15:22 +0200 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s50ns-0003Lt-Tx; Thu, 09 May 2024 12:15:08 +0200 Received: from [2a0a:edc0:0:1101:1d::54] (helo=dude05.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1s50ns-000RJA-G8; Thu, 09 May 2024 12:15:08 +0200 Received: from mol by dude05.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1s50ns-007Ww0-1S; Thu, 09 May 2024 12:15:08 +0200 Date: Thu, 9 May 2024 12:15:08 +0200 From: Michael Olbrich To: Ian Abbott Message-ID: Mail-Followup-To: Ian Abbott , ptxdist References: <3ec54e2f-eb27-4b3d-a73f-4bb3d937a136@mev.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3ec54e2f-eb27-4b3d-a73f-4bb3d937a136@mev.co.uk> X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain Subject: Re: [ptxdist] Should GDB select XZ? X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: ptxdist Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false On Tue, May 07, 2024 at 02:39:01PM +0100, Ian Abbott wrote: > The configure script of GDB (version 7.6 or later) has a --with-lzma option That's definitely old enough, so we can rely on the option to be available. gdb is always a bit tricky because we need to support multiple versions. > that controls whether GDB will use liblzma or not. (It is needed to for > reading .gnu_debuginfo sections from ELF files, if they are present.) By > default (if not explicitly enabled or disabled), it will use liblzma if it > is detected at build time. > > Currently, PTXdist does not configure GDB with any --with-lzma value, so > whether or not it is configured to use liblzma depends on whether some > version of XZ has previously been built or not. > > If GDB gets automatically configured to use liblzma, but the XZ package is > not to be installed (perhaps there is a previous build of XZ in the > platform's sysroot-target), then there will be a run-time error when running > GDB due to the missing library. It also means that the build of GDB may not > be reproducible. > > It seems to me that PTXdist should have a configuration option to choose > whether GDB should be built with liblzma support or not (and possibly a > configuration option to select whether the GDB version is 7.6 or later, > defaulting to true). The default could depend on > PTXCONF_TARGET_MINI_DEBUGINFO. If binaries have a .gnu_debuginfo section > then we probably want GDB to be able to use it! Right, gdb should definitely be able to read .gnu_debuginfo sections. I just never noticed this because I always use gdbserver. As you probably noticed by now, depending on PTXCONF_TARGET_MINI_DEBUGINFO does not work because it is defined in the platformconfig and gdb is not. > I'll attempt to knock up a patch for it. I appreciate it. The gdb package has seen little updated in the past because I don't actually use it myself. So fixes from someone who actually uses it are welcome. Michael -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |