public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Ken Brown <kbrown@cornell.edu>
To: cygwin@cygwin.com
Subject: Re: dumper does not produce core that gdb recognizes?
Date: Fri, 8 Jul 2022 18:53:08 -0400	[thread overview]
Message-ID: <308d675e-84a8-6d53-6ea9-a5a3abb258c6@cornell.edu> (raw)
In-Reply-To: <DM8PR09MB7095F85835743C5A9E045F1FA5829@DM8PR09MB7095.namprd09.prod.outlook.com>

On 7/8/2022 6:06 PM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin wrote:
> Hi all,
> 
> I need to do some deep debugging on Cygwin so I need to produce a core...  And it does not work.
> 
> So I reduced the problem to this minimal test case:
> 
> $ cat a.c
> #include <stdlib.h>
> 
> int main()
> {
>      abort();
> }
> 
> $ gcc -Wall -g a.c
> 
> $ echo $CYGWIN
> error_start=c:\cygwin64\bin\dumper.exe
> 
> $ ulimit -a
> core file size          (blocks, -c) unlimited
> data seg size           (kbytes, -d) unlimited
> file size               (blocks, -f) unlimited
> open files                      (-n) 3200
> pipe size            (512 bytes, -p) 8
> stack size              (kbytes, -s) 2036
> cpu time               (seconds, -t) unlimited
> max user processes              (-u) 256
> virtual memory          (kbytes, -v) unlimited
> 
> $ ./a
> *** starting debugger for pid 19934, tid 9332
> 
> $ ls -l a.*
> -rw-r--r-- 1 ANTON None      49 Jul  8 17:40 a.c
> -rwxr-xr-x 1 ANTON None  161487 Jul  8 17:41 a.exe*
> -rw-r--r-- 1 ANTON None 3331640 Jul  8 17:46 a.exe.core
> 
> $ file a.*
> a.c:        C source, ASCII text
> a.exe:      PE32+ executable (console) x86-64, for MS Windows
> a.exe.core: ELF 64-bit LSB core file, x86-64, version 1 (SYSV)
> 
> BUT: gdb does not want this core file:
> 
> $ gdb ./a.exe a.exe.core
> GNU gdb (GDB) (Cygwin 9.2-1) 9.2
> Copyright (C) 2020 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> Type "show copying" and "show warranty" for details.
> This GDB was configured as "x86_64-pc-cygwin".
> Type "show configuration" for configuration details.
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/gdb/bugs/>.
> Find the GDB manual and other documentation resources online at:
>      <http://www.gnu.org/software/gdb/documentation/>.
> 
> For help, type "help".
> Type "apropos word" to search for commands related to "word"...
> Reading symbols from ./a.exe...
> "/home/ANTON/a.exe.core": no core file handler recognizes format
> (gdb)
> 
> What I am doing wrong?

Try using a more recent gdb.  I just tried your test case with gdb-12.1-1 
(available as a test release), and it seemed to work.

Ken

  reply	other threads:[~2022-07-08 22:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-08 22:06 Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2022-07-08 22:53 ` Ken Brown [this message]
2022-07-08 23:09   ` [EXTERNAL] " Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2022-07-09  0:22     ` Takashi Yano
2022-07-09  0:58 Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2022-07-09  1:31 ` Backwoods BC
2022-07-09  6:30   ` Brian Inglis
2022-07-09 10:00 ` Jon Turney
2022-07-09 14:23 Lavrentiev, Anton (NIH/NLM/NCBI) [C]

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=308d675e-84a8-6d53-6ea9-a5a3abb258c6@cornell.edu \
    --to=kbrown@cornell.edu \
    --cc=cygwin@cygwin.com \
    /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).