From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id iNrEALJGcWcKgDgAWB0awg (envelope-from ) for ; Sun, 29 Dec 2024 07:55:14 -0500 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=gnu.org header.i=@gnu.org header.a=rsa-sha256 header.s=fencepost-gnu-org header.b=FLzAMW4b; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 0060D1E097; Sun, 29 Dec 2024 07:55:13 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=unavailable autolearn_force=no version=4.0.0 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 880EB1E05C for ; Sun, 29 Dec 2024 07:55:13 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 38277385840A for ; Sun, 29 Dec 2024 12:55:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 38277385840A Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gnu.org header.i=@gnu.org header.a=rsa-sha256 header.s=fencepost-gnu-org header.b=FLzAMW4b Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id E31853858D34 for ; Sun, 29 Dec 2024 12:54:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E31853858D34 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gnu.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E31853858D34 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2001:470:142:3::10 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1735476881; cv=none; b=BHZs0faPxbCCLLi/VBczgZ4gTEBBdaBALco24CK7kPBdFUdoxzne+7DE8BrzFoxM54ldm+bGXzzpQ/QfzqHWDOXpDqWv8NC1c9aYOVUaEpDEBnzWxju0lErAm6MToix7UZ+MxYVjeeXo/NwPo2DQnFqsHjd+HmccyIJEpihIgdA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1735476881; c=relaxed/simple; bh=BpuiIpmPiedd2JVdevpnUBNwXQKdmr8dXTo7kfXaUK8=; h=DKIM-Signature:Date:Message-Id:From:To:Subject; b=mWzdAwpFMSzPzys5IObIBHwjdZaW1SYqSih/uRKTuZBIyxDG7dbzs9W8XIw3dh38NLfyMFV6LAdaFJCgjPN7uCFVlhnBk4UtzJv4ZEoRJJkE4Vk/XwOiX/EJqGPX8KPUoXhBkR9ujmty4I7BVDLaOpAEvmRPF1yay7NQqlUqqi0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E31853858D34 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 1tRsoa-0003Sg-0c; Sun, 29 Dec 2024 07:54:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=1Gg+QMUr5rhxERAqTu4dJHkUZnlgGCym7/lHEXKvX9U=; b=FLzAMW4bD+uj dYEp5659+Kp8qziMPxz506AFPLSjJsu8veNJMuE62WIlBsSlQxcW58UZsOW3BtaABnwn0HcLysvAE hoTZ5mvG1Ri3rUDTG5d8FOyCxU5F1Uy5rUMcp6w78gTTN30YlXy0w1yqX9h6mIvjnIUqzhhSCHXTS 5v5RGvlgKs4ndkA59KvQwmPrtc3GpQCcLoqabxKc71I58uSibPGt03yPQ+2mu0Fvt1IKMDHm2PFac mphxPbZ3gksvemsODtplC2lGxN7NgvjyAlRH9xTWLly6iZAZscABmt4fON22RMj0Bnel8kMLVmwhy S0+x40quar1JHOnx45hqaA==; Date: Sun, 29 Dec 2024 14:54:36 +0200 Message-Id: <868qryr6nn.fsf@gnu.org> From: Eli Zaretskii To: Joel Brobecker Cc: gdb-patches@sourceware.org In-Reply-To: <20241229033130.D7F7F803EA@takamaka.gnat.com> (message from Joel Brobecker on Sun, 29 Dec 2024 07:31:30 +0400 (+04)) Subject: Re: GDB 16.0.90 available for testing References: <20241229033130.D7F7F803EA@takamaka.gnat.com> X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org > From: Joel Brobecker > Date: Sun, 29 Dec 2024 07:31:30 +0400 (+04) > > I have just finished creating the gdb-16.0.90 pre-release. > It is available for download at the following location: > > https://sourceware.org/pub/gdb/snapshots/branch/gdb-16.0.90.tar.xz > > A gzip'ed version is also available: gdb-16.0.90.tar.gz. > > Please give it a test if you can and report any problems you might find. I've built this pretest with mingw.org's MinGW (GCC 9.2.0), as 32-bit GDB executable for native Windows debugging, and found the following problems: 1. A compilation error in readline/input.c, due to lack of 'alarm' function. I have reported that several months ago to the upstream Readline developers, but the solution they installed only works for MinGW64. For mingw.org we need the following patch: --- readline/readline/input.c~0 2024-12-29 04:50:07.000000000 +0200 +++ readline/readline/input.c 2024-12-29 12:32:04.196630800 +0200 @@ -151,6 +151,14 @@ win32_isatty (int fd) # define RL_TIMEOUT_USE_SELECT #else # define RL_TIMEOUT_USE_SIGALRM +# ifdef __MINGW32_MAJOR_VERSION +/* mingw.org's MinGW doesn't have 'alarm'. */ +unsigned int +alarm (unsigned int seconds) +{ + return 0; +} +# endif #endif int rl_set_timeout (unsigned int, unsigned int); 2. Compilation error in event-top.c: CXX event-top.o In file included from d:\usr\include\winsock2.h:69, from ./../gdbsupport/gdb_select.h:30, from event-top.c:43: event-top.c: In function 'fd_set* fd_copy(fd_set*, const fd_set*, int)': event-top.c:1279:22: error: invalid conversion from 'const fd_set*' to 'fd_set*' [-fpermissive] 1279 | if (FD_ISSET (i, src)) | ^ | | | const fd_set* d:\usr\include\winsock.h:164:50: note: initializing argument 2 of 'int __FD_ISSET(SOCKET, fd_set*)' 164 | __CRT_ALIAS int __FD_ISSET( SOCKET __fd, fd_set *__set ) | ~~~~~~~~^~~~~ I solved it with an explicit cast, like this: --- gdb/event-top.c~0 2024-12-29 04:50:07.000000000 +0200 +++ gdb/event-top.c 2024-12-29 12:33:48.356713700 +0200 @@ -1276,7 +1276,7 @@ fd_copy (fd_set *dst, const fd_set *src, { FD_ZERO (dst); for (int i = 0; i < n; ++i) - if (FD_ISSET (i, src)) + if (FD_ISSET (i, (fd_set *)src)) FD_SET (i, dst); return dst; But I don't know if this will produce problems for other implementations of FD_ISSET. 3. Running GDB on itself produces the following error message: warning: BFD: error: d:\gnu\gdb-16.0.90\gdb\gdb.exe(.debug_macro) is too large (0x9f585e077fdeba bytes) warning: Can't read data for section '.debug_macro' in file 'd:\gnu\gdb-16.0.90\gdb\gdb.exe' During symbol reading: missing .debug_macro section The size of the section is obviously bogus; the real size is 0x77fdeba bytes, which is more than 128 MBytes, and so fails malloc. I tracked the bogus print value to this code in bfd: /* PR 20801: Provide a more helpful error message. */ if (bfd_get_error () == bfd_error_no_memory) _bfd_error_handler /* xgettext:c-format */ (_("error: %pB(%pA) is too large (%#" PRIx64 " bytes)"), abfd, sec, (uint64_t) allocsz); It sounds like uint64_t values are not printed correctly by BFD in this 32-bit build? I ended up using the following kludge: if (sizeof (allocsz ) > sizeof (int)) _bfd_error_handler /* xgettext:c-format */ (_("error: %pB(%pA) is too large (%#" PRIx64 " bytes)"), abfd, sec, (uint64_t) allocsz); else _bfd_error_handler /* xgettext:c-format */ (_("error: %pB(%pA) is too large (%#" PRIx32 " bytes)"), abfd, sec, allocsz); 4. Running "maint selftest" finds one failure: Running selftest help_doc_invariants. help doc broken invariant: command 'signal-event' help doc has over-long line Self test failed: self-test failed at unittests/command-def-selftests.c:121 I fixed that with the following trivial change: --- gdb/windows-nat.c~0 2024-12-29 04:50:07.000000000 +0200 +++ gdb/windows-nat.c 2024-12-29 12:54:32.346946000 +0200 @@ -3114,9 +3114,9 @@ _initialize_windows_nat () add_com ("signal-event", class_run, signal_event_command, _("\ Signal a crashed process with event ID, to allow its debugging.\n\ -This command is needed in support of setting up GDB as JIT debugger on \ -MS-Windows. The command should be invoked from the GDB command line using \ -the '-ex' command-line option. The ID of the event that blocks the \ +This command is needed in support of setting up GDB as JIT debugger on\n\ +MS-Windows. The command should be invoked from the GDB command line using\n\ +the '-ex' command-line option. The ID of the event that blocks the\n\ crashed process will be supplied by the Windows JIT debugging mechanism.")); #ifdef __CYGWIN__ I will report items 1 and 3 to the corresponding upstream projects, but is it okay to meanwhile install the patches above on the gdb-16-branch? And what about items 2 and 4 -- can I install their fixes? The fix with type-cast for FD_ISSET is something I'm unsure about. Thanks.