Re: Time for a MinGW-GDB Upgrade?

Keith Marshall <[email protected]> Sat, 18 Jul 2020 19:20:11 +0100
Newsgroups gmane.comp.gnu.mingw.user
Organization MinGW.org Project
Message-ID <[email protected]>
On 18/07/2020 17:58, Eli Zaretskii wrote:
>> From: Keith Marshall <[email protected]>
>> Date: Sat, 18 Jul 2020 17:09:05 +0100
>>
>>    CXX    source-cache.o
>>    ../../src/gdb-9.2/gdb/source-cache.c:37:10: fatal error:
>>    srchilite/sourcehighlight.h: No such file or directory
>>       37 | #include <srchilite/sourcehighlight.h>
>>          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>    compilation terminated.
>>    make[2]: *** [Makefile:1656: source-cache.o] Error 1
>>
>> Now, this should not have happened: there is a configuration test for
>> availability of source-highlight, which should have conditionally marked
>> this section of code for omission, (because the source-highlight API is
>> not present in my MinGW tree).
> 
> You mean, gdb/config.h has HAVE_SOURCE_HIGHLIGHT defined in your
> build, even though you don't have source-highlight installed?

Yes.  HAVE_SOURCE_HIGHLIGHT is exactly the conditional which is being
incorrectly specified, when gdb/configure generates gdb/config.h.

>> Yet another GDB configuration bug, which I will also report on
>> gdb-patches ... I can even offer a one-line patch to correct it.
> 
> Please do.  (Does it mean everyone else are building with
> source-highlight?)

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).

>> 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?

-- 
Regards,
Keith.

Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F

_______________________________________________
MinGW-Users mailing list
[email protected]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.osdn.me/mailman/listinfo/mingw-users
Also: mailto:[email protected]?subject=unsubscribe
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEwZ7AGBVH3lDh1I9TwK02xjR+Wj8FAl8TPVsACgkQwK02xjR+
Wj+8+BAAm0fw1qvZw5Ek4yd8YvTbJPyZpExqHRA8LowRxI8cGxOnLOmmeS0Qm8UP
4IwZpTuOnwFgF0zRqwemIpVYwfuc0E+D2kPAELxnbqyvkX5oDRefStYfcUL85UAE
1CFSMTECk1UGkr6T2Z4nds4reyuftux51JMkn+spz/2SbR00VIwdmMEROE92coKH
jpVqLm+yMX8RNnqaUfOc/bPUDgCCkwCZnB9l7j1nkd0geWcjcej8zkBG2vcmWoss
Z9K9Wrhcm4qdt0uQk8ZRh69s6Lv25GKjLVlzSOgjQbwg29/ja5hJPeZcCJwVEIkY
29s6YRVIcJz/bKDL9Ecx921EHD7Y8qzKMOGE9KbD2SPVdupiaAnxTNYxlJa/YlhH
oV7OB2V7az91POq9B/2SATaZJEPv8n5Q3L1+7v3x5V6qWvlvOHlQR5O8tT+6btc3
fzpk7JsSeqhuJUmqdEiHcHh0M2K7xfmq7ruwCBxLtIMFPGj2jGq/h52PDG23tXZG
9NAn0QlnZDjnyQ1S49Uny4lFcbfGKugsnYavGnkVH6Lw2qRk8RXG7vTvhM+IvfqX
ycx5wuMFzAv1YIb/bGtbF6Ly3DiaIl2cWibuxnUq0H5CWVL21gzwURSkVe5XbiBD
mfzOiziysOu1c8abNQG8jld+LHnDGXoPkQtNodfv3+x1MdJfDeU=
=R9jh
-----END PGP SIGNATURE-----