This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[Fwd: [Fwd: Caught signal 9 in core file ????]]


FYI,

Something that has been kicking around the GDB list but is really a BFD 
problem.  Anyone want to grab this and run with it?  I don't know enough 
about core dumps to do the job myself.

Andrew


Anyone want to play with this?  While a BFD bug, gdb is probably BFD's 
only core file customer.

Andrew


This happens with multithreaded programs, as BFD is picking up the current
signal from some other thread (which received a SIGKILL due to the death
of the currently executing thread).

The following lightly tested BFD patch would fix the problem at least for
Solaris, but I currently have very little time to file a proper RFA, sorry.

*** bfd/elf.c.orig	Sun Jul 29 10:48:13 2001
--- bfd/elf.c	Fri Sep 21 22:18:41 2001
***************
*** 5436,5442 ****
        offset   = offsetof (prstatus_t, pr_reg);
        memcpy (&prstat, note->descdata, sizeof (prstat));
  
!       elf_tdata (abfd)->core_signal = prstat.pr_cursig;
        elf_tdata (abfd)->core_pid = prstat.pr_pid;
  
        /* pr_who exists on:
--- 5436,5443 ----
        offset   = offsetof (prstatus_t, pr_reg);
        memcpy (&prstat, note->descdata, sizeof (prstat));
  
!       if (elf_tdata (abfd)->core_signal == 0)
! 	elf_tdata (abfd)->core_signal = prstat.pr_cursig;
        elf_tdata (abfd)->core_pid = prstat.pr_pid;
  
        /* pr_who exists on:
***************
*** 5459,5465 ****
        offset   = offsetof (prstatus32_t, pr_reg);
        memcpy (&prstat, note->descdata, sizeof (prstat));
  
!       elf_tdata (abfd)->core_signal = prstat.pr_cursig;
        elf_tdata (abfd)->core_pid = prstat.pr_pid;
  
        /* pr_who exists on:
--- 5460,5467 ----
        offset   = offsetof (prstatus32_t, pr_reg);
        memcpy (&prstat, note->descdata, sizeof (prstat));
  
!       if (elf_tdata (abfd)->core_signal == 0)
! 	elf_tdata (abfd)->core_signal = prstat.pr_cursig;
        elf_tdata (abfd)->core_pid = prstat.pr_pid;
  
        /* pr_who exists on:

> 
> While running gdb to investigate a core file I noticed at the
> beggining of the gdb output while reading the core file
> the following line (take a look to the last line):
> 
> Copyright 1998 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you
> are
> welcome to change it and/or distribute copies of it under certain
> conditions.
> Type "show copying" to see the conditions.  This version of GDB is
> supported
> for customers of Cygnus Solutions.  Type "show warranty" for details.
> This GDB was configured as "i386-pc-solaris2.7"...
> Core was generated by `/opt/ALAsm/ConfigMaint/bin/ConfigMaint'.
> Program terminated with signal 9, Killed.
> 
> 
> How can a signal 9 generate a core file?
> 
> Regards,
> Chabane
> 
> 
> 
> -- 
>   Alcatel USA              Internet: Chabane.Rezzik@usa.alcatel.com
>   1000 Coit Road Plano, Texas 75075
>   **** The opinions expressed are not those of Alcatel USA ****
> 
> _______________________________________________
> Bug-gdb mailing list
> Bug-gdb@gnu.org
> http://mail.gnu.org/mailman/listinfo/bug-gdb
> 
> 


-- 
Peter Schauer			pes@regent.e-technik.tu-muenchen.de

_______________________________________________
Bug-gdb mailing list
Bug-gdb@gnu.org
http://mail.gnu.org/mailman/listinfo/bug-gdb





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]