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.
This commit is contained in:
Joel Brobecker 2010-01-29 04:33:00 +00:00
parent 18c2a94fb0
commit a1504221ad
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2010-01-29 Joel Brobecker <brobecker@adacore.com>
* elf.c (elfcore_grok_lwpstatus): Do not overwrite the core signal
if it has already been set.
2010-01-27 Tristan Gingold <gingold@adacore.com>
* vms.h: Remove trailing spaces.

View File

@ -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. */