aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2011-05-12 07:41:43 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2011-05-12 07:41:43 +0000
commit335e41d4ebaea78f4ae85792b294f183da962c85 (patch)
tree18e03f08a134e31db4836f14292a78a0c243aea6 /bfd/elf.c
parent10483e8e4e96e64cd488c4481aa960925ff1a335 (diff)
downloadgdb-335e41d4ebaea78f4ae85792b294f183da962c85.zip
gdb-335e41d4ebaea78f4ae85792b294f183da962c85.tar.gz
gdb-335e41d4ebaea78f4ae85792b294f183da962c85.tar.bz2
bfd/
* config.in: Regenerated. * configure: Regenerated. * configure.in: New tests for HAVE_PRPSINFO_T_PR_PID, HAVE_PRPSINFO32_T_PR_PID, HAVE_PSINFO_T_PR_PID and HAVE_PSINFO32_T_PR_PID. * elf.c (elfcore_grok_psinfo): Protect reading psinfo.pr_pid by HAVE_PRPSINFO_T_PR_PID, HAVE_PRPSINFO32_T_PR_PID, HAVE_PSINFO_T_PR_PID and HAVE_PSINFO32_T_PR_PID. * hosts/x86-64linux.h (HAVE_PRPSINFO32_T_PR_PID): New redefinition.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r--bfd/elf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/bfd/elf.c b/bfd/elf.c
index 966ada0..33a3a7d 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -8000,7 +8000,9 @@ elfcore_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
memcpy (&psinfo, note->descdata, sizeof (psinfo));
+#if defined (HAVE_PSINFO_T_PR_PID) || defined (HAVE_PRPSINFO_T_PR_PID)
elf_tdata (abfd)->core_pid = psinfo.pr_pid;
+#endif
elf_tdata (abfd)->core_program
= _bfd_elfcore_strndup (abfd, psinfo.pr_fname,
sizeof (psinfo.pr_fname));
@@ -8017,7 +8019,9 @@ elfcore_grok_psinfo (bfd *abfd, Elf_Internal_Note *note)
memcpy (&psinfo, note->descdata, sizeof (psinfo));
+#if defined (HAVE_PSINFO32_T_PR_PID) || defined (HAVE_PRPSINFO32_T_PR_PID)
elf_tdata (abfd)->core_pid = psinfo.pr_pid;
+#endif
elf_tdata (abfd)->core_program
= _bfd_elfcore_strndup (abfd, psinfo.pr_fname,
sizeof (psinfo.pr_fname));