PATCH: bfd/elf.c for UnixWare (v3)
rbrown64@csc.com.au
rbrown64@csc.com.au
Fri Jan 18 03:05:00 GMT 2002
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));
}
More information about the Binutils
mailing list