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

Back to archive index
Keith Marshall keith****@users*****
Sun Jul 19 03:20:11 JST 2020


On 18/07/2020 17:58, Eli Zaretskii wrote:
>> From: Keith Marshall <keith****@users*****>
>> 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.osdn.me/mailman/archives/mingw-users/attachments/20200718/38e45f78/attachment.sig>


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