From: Joel Brobecker Date: Fri, 29 Jan 2010 04:33:00 +0000 (+0000) Subject: core files: wrong signal number with threaded program on sparc-solaris. X-Git-Tag: sid-snapshot-20100201~28 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a1504221ad15cfb08f22fd5548835d33f3d041de;p=thirdparty%2Fbinutils-gdb.git core files: wrong signal number with threaded program on sparc-solaris. * elf.c (elfcore_grok_lwpstatus): Do not overwrite the core signal if it has already been set. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ce2c0c62ea9..efd86131f22 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2010-01-29 Joel Brobecker + + * elf.c (elfcore_grok_lwpstatus): Do not overwrite the core signal + if it has already been set. + 2010-01-27 Tristan Gingold * vms.h: Remove trailing spaces. diff --git a/bfd/elf.c b/bfd/elf.c index aac33148589..19e4695f2b6 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -7800,7 +7800,10 @@ elfcore_grok_lwpstatus (bfd *abfd, Elf_Internal_Note *note) memcpy (&lwpstat, note->descdata, sizeof (lwpstat)); elf_tdata (abfd)->core_lwpid = lwpstat.pr_lwpid; - elf_tdata (abfd)->core_signal = lwpstat.pr_cursig; + /* Do not overwrite the core signal if it has already been set by + another thread. */ + if (elf_tdata (abfd)->core_signal == 0) + elf_tdata (abfd)->core_signal = lwpstat.pr_cursig; /* Make a ".reg/999" section. */