summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-11-29 10:34:01 +0000
committerNick Clifton <nickc@redhat.com>2001-11-29 10:34:01 +0000
commit0d3fb3210755f37d40a98d2c8b0e49d1735b5a9f (patch)
treedf25d2e7c6724c24bcb4ffc6bac26917cc19df4f
parent831718f4024ccb6411a87ee6f0041837e21b1884 (diff)
downloadbinutils-redhat-0d3fb3210755f37d40a98d2c8b0e49d1735b5a9f.tar.gz
Do not overwite the core signal if it has already been set by another thread.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf.c10
2 files changed, 13 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index b126fd7ff7..599f5f0b7a 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2001-11-29 "Peter.Schauer" <Peter.Schauer@regent.e-technik.tu-muenchen.de>
+
+ * elf.c (elfcore_grok_prstatus): Do not overwite the core signal
+ if it has already been set by another thread.
+
2001-11-28 Jakub Jelinek <jakub@redhat.com>
* elf64-alpha.c (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Defined.
diff --git a/bfd/elf.c b/bfd/elf.c
index 51ae3dbdbf..81923d176d 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -5753,7 +5753,10 @@ elfcore_grok_prstatus (abfd, note)
offset = offsetof (prstatus_t, pr_reg);
memcpy (&prstat, note->descdata, sizeof (prstat));
- elf_tdata (abfd)->core_signal = prstat.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 = prstat.pr_cursig;
elf_tdata (abfd)->core_pid = prstat.pr_pid;
/* pr_who exists on:
@@ -5776,7 +5779,10 @@ elfcore_grok_prstatus (abfd, note)
offset = offsetof (prstatus32_t, pr_reg);
memcpy (&prstat, note->descdata, sizeof (prstat));
- elf_tdata (abfd)->core_signal = prstat.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 = prstat.pr_cursig;
elf_tdata (abfd)->core_pid = prstat.pr_pid;
/* pr_who exists on: