* [ptxdist] Should GDB select XZ?
@ 2024-05-07 13:39 Ian Abbott
2024-05-09 10:15 ` Michael Olbrich
0 siblings, 1 reply; 2+ messages in thread
From: Ian Abbott @ 2024-05-07 13:39 UTC (permalink / raw)
To: ptxdist
Hi,
The configure script of GDB (version 7.6 or later) has a --with-lzma
option 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!
I'll attempt to knock up a patch for it.
--
-=( Ian Abbott <abbotti@mev.co.uk> || MEV Ltd. is a company )=-
-=( registered in England & Wales. Regd. number: 02862268. )=-
-=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=-
-=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || www.mev.co.uk )=-
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [ptxdist] Should GDB select XZ?
2024-05-07 13:39 [ptxdist] Should GDB select XZ? Ian Abbott
@ 2024-05-09 10:15 ` Michael Olbrich
0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2024-05-09 10:15 UTC (permalink / raw)
To: Ian Abbott; +Cc: ptxdist
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 |
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-05-09 10:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-07 13:39 [ptxdist] Should GDB select XZ? Ian Abbott
2024-05-09 10:15 ` Michael Olbrich
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox