[Mingw-users] Time for a MinGW-GDB Upgrade?

Back to archive index
Eli Zaretskii eliz****@gnu*****
Sun Jul 19 04:08:32 JST 2020


> From: Keith Marshall <keith****@users*****>
> Date: Sat, 18 Jul 2020 19:20:11 +0100
> 
> Not necessarily.  The bug is in pkg-config detection: gdb/configure.ac
> uses the wrong autoconf macro, selecting pkg-config for $build, (i.e.
> x86_64-pc-linux-gnu, in my case), where it should select pkg-config for
> $host, (i.e. mingw32, so mingw32-pkg-config).  Since it's using the
> wrong pkg-config, it gets the wrong answer when it asks
> 
>    $pkg_config_prog_path --exists source-highlight
> 
> (which *does* exist, in the GNU/Linux native compiler tree).

Ah, so the problem only happens in a cross-build.

> >> That said, I note that you, Eli, do build your GDB with source-highlight
> >> support.  How much of a sacrifice would it be, if I omit it?
> > 
> > Not much.  The source code shown by GDB commands such as "list",
> > "backtrace" etc. will not be highlighted, but that's all.  GDB only
> > supports this feature since 8.3, i.e. 2 releases ago.
> 
> Okay.  Unless anyone strongly objects, I'll not chase down the
> dependencies, and I'll build without source-highlight.  I also propose
> to build without python, without guile, and without expat; will their
> omission create any significant problems?

Omitting Python might be a problem, many projects have custom object
pretty-printers written in Python (even GCC does for libstdc++),
without which the users will need jump through hoops to see objects in
human-readable form.  There are also a couple of GDB commands that are
implemented in Python.

Expat is needed to parse the XML files supplied with GDB.  From the
GDB README:

  `--with-expat'
       Build GDB with Expat, a library for XML parsing.  (Done by
       default if libexpat is installed and found at configure time.)
       This library is used to read XML files supplied with GDB.  If it
       is unavailable, some features, such as remote protocol memory
       maps, target descriptions, and shared library lists, that are
       based on XML files, will not be available in GDB.  If your host
       does not have libexpat installed, you can get the latest version
       from `http://expat.sourceforge.net'.

So if the MinGW GDB is only used for native debugging, I guess the
loss due to no-expat will be minimal, but otherwise it's quite
significant, I think.

The old MinGW site has expat, can't that be used?



More information about the MinGW-Users mailing list
Back to archive index