This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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));
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]