summaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2010-01-29 04:32:59 +0000
committerJoel Brobecker <brobecker@gnat.com>2010-01-29 04:32:59 +0000
commitf9d83187379e0c7ffa57d5274e320c1841c38d4f (patch)
treea118ca95d976c7e6007582db26d53359426f641d /bfd/elf.c
parentfde26d935b5413cba19e22d64c3eac88654b8add (diff)
downloadbinutils-redhat-f9d83187379e0c7ffa57d5274e320c1841c38d4f.tar.gz
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.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index aac3314858..19e4695f2b 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. */