This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
PATCH: bfd/elf.c for UnixWare (v3)
- From: rbrown64 at csc dot com dot au
- To: binutils at sources dot redhat dot com
- Cc: <msnyder at redhat dot com>
- Date: Fri, 18 Jan 2002 18:07:49 +1100
- Subject: PATCH: bfd/elf.c for UnixWare (v3)
2002-01-18 Rodney Brown <rbrown64@csc.com.au>
* elf.c(elfcore_write_pstatus): UnixWare support.
--- elf.c.bu Fri Jan 11 10:05:21 2002
+++ elf.c Fri Jan 18 14:19:18 2002
@@ -6591,9 +6591,27 @@ elfcore_write_pstatus (abfd, buf, bufsiz
pstatus_t pstat;
char *note_name = "CORE";
- memset (&pstat, 0, sizeof (prstat));
+ memset (&pstat, 0, sizeof (pstat));
pstat.pr_pid = pid;
+#if !defined (HAVE_LWPSTATUS_T)
+ pstat.pr_cursig = cursig;
memcpy (pstat.pr_reg, gregs, sizeof (pstat.pr_reg));
+#else
+ pstat.pr_lwp.pr_cursig = cursig;
+#if defined (HAVE_LWPSTATUS_T_PR_REG)
+ memcpy (pstat.pr_lwp.pr_reg, gregs, sizeof (pstat.pr_lwp.pr_reg));
+#elif defined (HAVE_LWPSTATUS_T_PR_CONTEXT)
+#if !defined(gregs)
+ memcpy (pstat.pr_lwp.pr_context.uc_mcontext.gregs,
+ gregs, sizeof (gregset_t));
+#else
+ memcpy (pstat.pr_lwp.pr_context.uc_mcontext.__gregs,
+ gregs, sizeof (gregset_t));
+#endif
+#else
+#error FixMe
+#endif
+#endif
return elfcore_write_note (abfd, buf, bufsiz,
note_name, NT_PSTATUS, &pstat, sizeof (pstat));
}