Print this page
XXX AVX procfs

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libproc/common/Pcore.c
          +++ new/usr/src/lib/libproc/common/Pcore.c
↓ open down ↓ 579 lines elided ↑ open up ↑
 580  580           * terminated by an AT_NULL element; in each case, we've allocated
 581  581           * P->auxv to have an additional element which we force to be AT_NULL.
 582  582           */
 583  583          P->auxv[n].a_type = AT_NULL;
 584  584          P->auxv[n].a_un.a_val = 0L;
 585  585          P->nauxv = (int)n;
 586  586  
 587  587          return (0);
 588  588  }
 589  589  
 590      -#ifdef __sparc
 591  590  static int
 592  591  note_xreg(struct ps_prochandle *P, size_t nbytes)
 593  592  {
 594  593          lwp_info_t *lwp = P->core->core_lwp;
 595  594          size_t xbytes = sizeof (prxregset_t);
 596  595          prxregset_t *xregs;
 597  596  
 598  597          if (lwp == NULL || lwp->lwp_xregs != NULL || nbytes < xbytes)
 599  598                  return (0);     /* No lwp yet, already seen, or bad size */
 600  599  
 601  600          if ((xregs = malloc(xbytes)) == NULL)
 602  601                  return (-1);
 603      -
      602 +#ifdef __sparc
 604  603          if (read(P->asfd, xregs, xbytes) != xbytes) {
      604 +#else
      605 +        panic("port me");
      606 +#endif
 605  607                  dprintf("Pgrab_core: failed to read NT_PRXREG\n");
 606  608                  free(xregs);
 607  609                  return (-1);
 608  610          }
 609      -
 610  611          lwp->lwp_xregs = xregs;
 611  612          return (0);
 612  613  }
 613  614  
      615 +#ifdef __sparc
 614  616  static int
 615  617  note_gwindows(struct ps_prochandle *P, size_t nbytes)
 616  618  {
 617  619          lwp_info_t *lwp = P->core->core_lwp;
 618  620  
 619  621          if (lwp == NULL || lwp->lwp_gwins != NULL || nbytes == 0)
 620  622                  return (0);     /* No lwp yet or already seen or no data */
 621  623  
 622  624          if ((lwp->lwp_gwins = malloc(sizeof (gwindows_t))) == NULL)
 623  625                  return (-1);
↓ open down ↓ 58 lines elided ↑ open up ↑
 682  684  
 683  685  /*
 684  686   * Populate a table of function pointers indexed by Note type with our
 685  687   * functions to process each type of core file note:
 686  688   */
 687  689  static int (*nhdlrs[])(struct ps_prochandle *, size_t) = {
 688  690          note_notsup,            /*  0   unassigned              */
 689  691          note_notsup,            /*  1   NT_PRSTATUS (old)       */
 690  692          note_notsup,            /*  2   NT_PRFPREG (old)        */
 691  693          note_notsup,            /*  3   NT_PRPSINFO (old)       */
 692      -#ifdef __sparc
 693  694          note_xreg,              /*  4   NT_PRXREG               */
 694      -#else
 695      -        note_notsup,            /*  4   NT_PRXREG               */
 696      -#endif
 697  695          note_platform,          /*  5   NT_PLATFORM             */
 698  696          note_auxv,              /*  6   NT_AUXV                 */
 699  697  #ifdef __sparc
 700  698          note_gwindows,          /*  7   NT_GWINDOWS             */
 701  699  #ifdef __sparcv9
 702  700          note_asrs,              /*  8   NT_ASRS                 */
 703  701  #else
 704  702          note_notsup,            /*  8   NT_ASRS                 */
 705  703  #endif
 706  704  #else
↓ open down ↓ 1492 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX