From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id A65A83AA9906 for ; Sat, 17 Dec 2022 17:17:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A65A83AA9906 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6anu-0000OP-H7; Sat, 17 Dec 2022 12:17:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Subject:To:From:Date:mime-version:in-reply-to: references; bh=47xte8eSF+1C1r0wOOZNiW0G3pXBLiIo7JDd/NRKZWo=; b=JI/kowM+4fhYMS TE1mU3l+c3hyycH6Xt2pHQpGUjA2OfP3mDDK2PIyYQ0N7F6UeEIxg9WyzpSpqDBA25o2m3BCm7vw7 Bw3phO7VU8RvMKluhoFf5OBnc45ZJUnX48sYO8ouCsq/jBh6eWhw+neJKJg0D5/hOQj2F3XarRG1H S4P3GFxh1SeLwPsaOy8m/KZthn+KNfTVJcq+awtROERpz7Qo6uh5Unj+awP2f0Tz/pJkGlQwRk0fK nLErzR5LoFsvixmkv6pvE5WfSCOD5m9eh8FjoUmtViROt2Nb73EY9yXwn93D/72+3Ekkky16SVJ0q vRO6PSOdu55eta2zfQDw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6ant-0002rk-Nz; Sat, 17 Dec 2022 12:16:54 -0500 Date: Sat, 17 Dec 2022 19:16:59 +0200 Message-Id: <83k02qgdbo.fsf@gnu.org> From: Eli Zaretskii To: gdb-patches@sourceware.org CC: Joel Brobecker Subject: MinGW build of GDB 13 snapshot X-Spam-Status: No, score=1.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_BARRACUDACENTRAL,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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 #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);