public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Ken Brown <kbrown@cornell.edu>
To: cygwin <cygwin@cygwin.com>
Subject: gdb and core files
Date: Sat, 27 Jun 2020 20:50:39 -0400	[thread overview]
Message-ID: <7e6b53dd-ef3d-e451-86f9-1a2c3d12209e@cornell.edu> (raw)

Following the instructions at 
https://cygwin.com/cygwin-ug-net/using-cygwinenv.html, I tried to create a core 
file that I could examine with gdb, but I apparently ran into a gdb bug.  I 
tried both gdb 9.2-1 and 8.3.1-1.  Here are the results with 9.2-1.

$ cat crash.c
#include <stddef.h>
int
main ()
{
   char *p = NULL;
   char c = *p;
}

$ gcc -g crash.c

$ CYGWIN='error_start:c:\cygwin64\bin\dumper.exe' ./a
*** starting debugger for pid 2034, tid 99552

$ gdb ./a.exe a.exe.core
GNU gdb (GDB) (Cygwin 9.2-1) 9.2
[...]
Reading symbols from ./a.exe...

warning: core file may not match specified executable file.
[New Thread 0x1b724]
[New Thread 0x23450]
[New Thread 0x16cb4]
[New Thread 0x1c4b4]
[New Thread 0x9050]

warning: Unexpected size of section `.reg/112420' in core file.
/wip/cygport-git/gdb/gdb-9.2-1.x86_64/src/gdb-9.2/gdb/corelow.c:640: 
internal-error: void core_target::get_core_register_section(regcache*, const 
regset*, const char*, int, int, const char*, bool): Assertion `m_core_vec != 
nullptr' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) y

This is a bug, please report it.  For instructions, see:
<http://www.gnu.org/software/gdb/bugs/>.

/wip/cygport-git/gdb/gdb-9.2-1.x86_64/src/gdb-9.2/gdb/corelow.c:640: 
internal-error: void core_target::get_core_register_section(regcache*, const 
regset*, const char*, int, int, const char*, bool): Assertion `m_core_vec != 
nullptr' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) n

Did I do something wrong?

Ken

             reply	other threads:[~2020-06-28  0:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-28  0:50 Ken Brown [this message]
2020-06-28 13:31 ` Jon Turney
2020-06-29 16:03   ` Ken Brown
2020-06-30  3:24     ` Mark Geisert
2020-07-01 21:37       ` Jon Turney
2020-07-03  6:37         ` Mark Geisert

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=7e6b53dd-ef3d-e451-86f9-1a2c3d12209e@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).