]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
core files: wrong signal number with threaded program on sparc-solaris.
authorJoel Brobecker <brobecker@gnat.com>
Fri, 29 Jan 2010 04:33:00 +0000 (04:33 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Fri, 29 Jan 2010 04:33:00 +0000 (04:33 +0000)
        * elf.c (elfcore_grok_lwpstatus): Do not overwrite the core signal
        if it has already been set.

bfd/ChangeLog
bfd/elf.c

index ce2c0c62ea9bb6f50a3fcaedd9ad1c91da955db1..efd86131f2204d46d910ee4e08d4d5b279708afc 100644 (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.
index aac33148589d5b4eeb37939105680defd0089a80..19e4695f2b644313d59d17536a33ba88c999821f 100644 (file)
--- 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.  */