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
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to