Print this page
XXX AVX procfs

@@ -585,11 +585,10 @@
         P->nauxv = (int)n;
 
         return (0);
 }
 
-#ifdef __sparc
 static int
 note_xreg(struct ps_prochandle *P, size_t nbytes)
 {
         lwp_info_t *lwp = P->core->core_lwp;
         size_t xbytes = sizeof (prxregset_t);

@@ -598,21 +597,24 @@
         if (lwp == NULL || lwp->lwp_xregs != NULL || nbytes < xbytes)
                 return (0);     /* No lwp yet, already seen, or bad size */
 
         if ((xregs = malloc(xbytes)) == NULL)
                 return (-1);
-
+#ifdef __sparc
         if (read(P->asfd, xregs, xbytes) != xbytes) {
+#else
+        panic("port me");
+#endif
                 dprintf("Pgrab_core: failed to read NT_PRXREG\n");
                 free(xregs);
                 return (-1);
         }
-
         lwp->lwp_xregs = xregs;
         return (0);
 }
 
+#ifdef __sparc
 static int
 note_gwindows(struct ps_prochandle *P, size_t nbytes)
 {
         lwp_info_t *lwp = P->core->core_lwp;
 

@@ -687,15 +689,11 @@
 static int (*nhdlrs[])(struct ps_prochandle *, size_t) = {
         note_notsup,            /*  0   unassigned              */
         note_notsup,            /*  1   NT_PRSTATUS (old)       */
         note_notsup,            /*  2   NT_PRFPREG (old)        */
         note_notsup,            /*  3   NT_PRPSINFO (old)       */
-#ifdef __sparc
         note_xreg,              /*  4   NT_PRXREG               */
-#else
-        note_notsup,            /*  4   NT_PRXREG               */
-#endif
         note_platform,          /*  5   NT_PLATFORM             */
         note_auxv,              /*  6   NT_AUXV                 */
 #ifdef __sparc
         note_gwindows,          /*  7   NT_GWINDOWS             */
 #ifdef __sparcv9