From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id e2A2BHunn2KVbQAAWB0awg (envelope-from ) for ; Tue, 07 Jun 2022 15:31:07 -0400 Received: by simark.ca (Postfix, from userid 112) id F07FC1E223; Tue, 7 Jun 2022 15:31:06 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=R4kzCQiy; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 393B71E143 for ; Tue, 7 Jun 2022 15:31:03 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id ACE92386F0F0 for ; Tue, 7 Jun 2022 19:31:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ACE92386F0F0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1654630261; bh=2vwj7ZBrInZosWW1PSYrldRJl2MoDsXvTUyLfyvvoj8=; h=Date:To:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=R4kzCQiy8sd0zXXc4m6+OmdAYKYtVn+jWXbQfFLtIoD+72AtxN6vv4BylSny3f+2i VL62ZB+alnz96mP/rg+TsnE0yg1Ju7kwiwu/uyiZWXnRSEmcg7MAfzvNZgVsKMyHMM X/5/al2laNieJLdh+sNEl5aEaV9Yq1Wyvi5E1vdQ= Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 99B0E38582A3 for ; Tue, 7 Jun 2022 19:30:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 99B0E38582A3 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44438) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nyeuR-0005HR-4W for gdb@sourceware.org; Tue, 07 Jun 2022 15:30:35 -0400 Received: from ip5f5a89c6.dynamic.kabel-deutschland.de ([95.90.137.198]:57919 helo=[192.168.111.41]) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nyeu3-0005eF-6m for gdb@sourceware.org; Tue, 07 Jun 2022 15:30:34 -0400 Message-ID: Date: Tue, 7 Jun 2022 21:30:07 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Content-Language: en-US To: Simon Sobisch via Gdb Subject: Is corefile support for missing on Win32? Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Simon Sobisch via Gdb Reply-To: Simon Sobisch Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" Testing with MSYS2 generated mingw64 gcc 12.1 + gdb 12.1 resulted in "everything working" ...until I needed to create a core file. (gdb) show arch The target architecture is set to "auto" (currently "i386:x86-64"). (gdb) gcore test.core warning: cannot close "test.core": invalid operation Can't create a corefile (with gnutarget auto, pei-x86-64 and pe-x86-64) I see that the first error message comes from gdb/gdb_bfd.c (gdb_bfd_close_warning) and the second from the default implementation gdb/exec.c (make_corefile_notes) This issue seems to exists for longer as some SO question [1] asked about this over 5 years ago. Further testing showed the same issue with same tools in MinGW x86 and with "good old MinGW" using GDB 7.6.1 / GCC 9.2. Testing with cygwin-x64 (GDB 11.2) shows the same result. Questions: * Is there something missing in the configuration / build to get it working? * Should I file a bug on https://sourceware.org/bugzilla/buglist.cgi?component=corefiles ? Thanks to share some info, Simon Background: I want to move from an "unsafe signal handler" doing a text-dump of variables in GnuCOBOL to "create a coredump, let the user inspect this"; but if this doesn't work on Win32 I may need some different approach there. I guess the system's minidump format cannot be processed with GDB, can it? Do you see other options to do post-mortem debugging on Win32? Simon [1]:https://stackoverflow.com/questions/41468614/warning-cannot-close-core-xxxxx-invalid-operation