Mail Archives: cygwin-developers/2002/01/15/07:01:04
Hi!
Tuesday, 15 January, 2002 Jonathan Kamens jik AT curl DOT com wrote:
>> Date: Mon, 14 Jan 2002 21:16:37 +0300
>> From: egor duda <deo AT logos-m DOT ru>
>> Hmm. Does resulting core dump "looks" ok? it should be elf file of
>> size 1MB or more.
JK> VOLTRON$ ls -l *.core
JK> -rw-r--r-- 1 jik Administ 1993904 Jan 14 12:49 a.exe.core
JK> -rw-r--r-- 1 jik Administ 4855584 Jan 14 12:50 gdb.exe.core
JK> VOLTRON$ file *.core
JK> a.exe.core: ELF 32-bit LSB core file of 'n' (signal 6750329), Intel 80386, version 1 (SYSV)
JK> gdb.exe.core: ELF 32-bit LSB core file of 'n' (signal 6750329), Intel 80386, version 1 (SYSV)
JK> VOLTRON$
>> Do i remember correctly that gdb crashes even on coredump created
>> by simple { int* x=0; *x=1; } program?
JK> Yes.
the core file is ok. the crash was triggered by combination of two
factors: bug in gdb, which following patch is supposed to fix, and
change in size of CONTEXT structure. gdb and dumper must be built with
common set of headers in order to interoperate.
can you please try this patch, rebuild gdb, ensuring that it uses
latest w32api headers, and give it a try?
2002-01-15 Egor Duda <deo AT logos-m DOT ru>
* elf.c (elfcore_grok_win32pstatus): Copy only as much
information as possible to avoid stack corruption.
Index: elf.c
===================================================================
RCS file: /cvs/uberbaum/bfd/elf.c,v
retrieving revision 1.121
diff -u -p -2 -r1.121 elf.c
--- bfd/elf.c 2002/01/10 23:05:21 1.121
+++ bfd/elf.c 2002/01/15 11:50:18
@@ -6261,5 +6261,5 @@ elfcore_grok_win32pstatus (abfd, note)
return true;
- memcpy (&pstatus, note->descdata, note->descsz);
+ memcpy (&pstatus, note->descdata, sizeof (pstatus));
switch (pstatus.data_type)
Egor. mailto:deo AT logos-m DOT ru ICQ 5165414 FidoNet 2:5020/496.19
- Raw text -