public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Simon Sobisch <simonsobisch@gnu.org>
To: Simon Sobisch via Gdb <gdb@sourceware.org>
Subject: Is corefile support for missing on Win32?
Date: Tue, 7 Jun 2022 21:30:07 +0200	[thread overview]
Message-ID: <e73f4662-7614-c05a-77dd-bd65ac858cb5@gnu.org> (raw)

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

             reply	other threads:[~2022-06-07 19:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-07 19:30 Simon Sobisch [this message]
2022-06-09 16:20 ` Pedro Alves
2023-02-07 10:35   ` Simon Sobisch
2023-02-07 20:18     ` Christian Biesinger
2023-02-08 16:28       ` Hannes Domani

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=e73f4662-7614-c05a-77dd-bd65ac858cb5@gnu.org \
    --to=simonsobisch@gnu.org \
    --cc=gdb@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).