[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gdb-bugs
Subject:    Re: Caught signal 9 in core file ????
From:       "Peter.Schauer" <Peter.Schauer () regent ! e-technik ! tu-muenchen ! de>
Date:       2001-09-21 22:27:11
Message-ID: 200109212027.WAA15382 () reisser ! regent ! e-technik ! tu-muenchen ! de
[Download RAW message or body]

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic