public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* gdb and core files
@ 2020-06-28  0:50 Ken Brown
  2020-06-28 13:31 ` Jon Turney
  0 siblings, 1 reply; 6+ messages in thread
From: Ken Brown @ 2020-06-28  0:50 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-07-03  6:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-28  0:50 gdb and core files Ken Brown
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

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).