From: Eli Zaretskii <eliz@gnu.org>
To: gdb-patches@sourceware.org
Cc: Joel Brobecker <brobecker@adacore.com>
Subject: MinGW build of GDB 13 snapshot
Date: Sat, 17 Dec 2022 19:16:59 +0200 [thread overview]
Message-ID: <83k02qgdbo.fsf@gnu.org> (raw)
I've built the latest snapshot 13.0.50.20221217-git of GDB using
mingw.org's MinGW on MS-Windows. I saw only two issues with this
build, described below.
One of those issues is in the bfd directory, and I will report it to
the Binutils list. I'm asking here what to do with that issue
meanwhile: do I install a fix for it in our copy of bfd, or do I wait
for Binutils folks to fix it up-stream? The fix is simple:
--- bfd/bfdio.c~0 2022-12-17 03:47:10.000000000 +0200
+++ bfd/bfdio.c 2022-12-17 16:45:38.067750000 +0200
@@ -31,8 +31,10 @@
#include <locale.h>
#endif
-#if defined(__MINGW64_VERSION_MAJOR) && __MINGW64_VERSION_MAJOR < 9
-/* This prototype was added to locale.h in version 9.0 of MinGW-w64. */
+#if (defined(__MINGW64_VERSION_MAJOR) && __MINGW64_VERSION_MAJOR < 9) \
+ || (defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR))
+/* This prototype was added to locale.h in version 9.0 of MinGW-w64,
+ and is absent from all versions of mingw.org's MinGW. */
_CRTIMP unsigned int __cdecl ___lc_codepage_func(void);
#endif
The other issue is with the new stuff in nat/windows-nat.c. Here are
the compilation error messages:
CXX nat/windows-nat.o
../gdb/nat/windows-nat.c: In function 'BOOL windows_nat::create_process_wrapper(FUNC*, const CHAR*, CHAR*, DWORD, void*, const CHAR*, bool, INFO*, PROCESS_INFORMATION*)':
../gdb/nat/windows-nat.c:813:9: error: 'PPROC_THREAD_ATTRIBUTE_LIST' was not declared in this scope
813 | = (PPROC_THREAD_ATTRIBUTE_LIST) alloca (size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../gdb/nat/windows-nat.c:813:37: error: expected ';' before '__builtin_alloca'
813 | = (PPROC_THREAD_ATTRIBUTE_LIST) alloca (size);
| ^
| ;
../gdb/nat/windows-nat.c:831:9: error: 'EXTENDED_STARTUPINFO_PRESENT' was not declared in this scope
831 | | EXTENDED_STARTUPINFO_PRESENT),
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
This happens because these two symbols are not visible when compiling
GDB with _WIN32_WINNT set to an older version that Windows 8. The
patch for this is below. OK to commit it on the master branch?
--- gdb/nat/windows-nat.c~0 2022-12-17 03:47:12.000000000 +0200
+++ gdb/nat/windows-nat.c 2022-12-17 16:46:20.817750000 +0200
@@ -802,6 +802,10 @@ create_process_wrapper (FUNC *do_create_
gdb_extended_info info_ex {};
+# ifndef EXTENDED_STARTUPINFO_PRESENT
+# define EXTENDED_STARTUPINFO_PRESENT 0x00080000
+# endif
+
if (startup_info != nullptr)
info_ex.StartupInfo = *startup_info;
info_ex.StartupInfo.cb = sizeof (info_ex);
@@ -810,7 +814,7 @@ create_process_wrapper (FUNC *do_create_
call always fails, by design. */
InitializeProcThreadAttributeList (nullptr, 1, 0, &size);
info_ex.lpAttributeList
- = (PPROC_THREAD_ATTRIBUTE_LIST) alloca (size);
+ = (gdb_lpproc_thread_attribute_list) alloca (size);
InitializeProcThreadAttributeList (info_ex.lpAttributeList,
1, 0, &size);
next reply other threads:[~2022-12-17 17:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-17 17:16 Eli Zaretskii [this message]
2022-12-19 21:14 ` Tom Tromey
2022-12-20 14:12 ` Eli Zaretskii
2022-12-21 3:26 ` Joel Brobecker
2022-12-22 10:46 ` Eli Zaretskii
2022-12-23 3:28 ` Joel Brobecker
2022-12-23 8:07 ` Eli Zaretskii
2022-12-23 9:13 ` Joel Brobecker
2022-12-23 11:21 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83k02qgdbo.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).