Print this page
XXX AVX procfs

Split Close
Expand all
Collapse all
          --- old/usr/src/lib/libc_db/common/thread_db.c
          +++ new/usr/src/lib/libc_db/common/thread_db.c
↓ open down ↓ 1955 lines elided ↑ open up ↑
1956 1956  
1957 1957  /*
1958 1958   * Get the size of the extra state register set for this architecture.
1959 1959   * Currently unused by dbx.
1960 1960   */
1961 1961  #pragma weak td_thr_getxregsize = __td_thr_getxregsize
1962 1962  /* ARGSUSED */
1963 1963  td_err_e
1964 1964  __td_thr_getxregsize(td_thrhandle_t *th_p, int *xregsize)
1965 1965  {
1966      -#if defined(__sparc)
1967 1966          struct ps_prochandle *ph_p;
1968 1967          td_err_e return_val;
1969 1968  
1970 1969          if ((ph_p = ph_lock_th(th_p, &return_val)) == NULL)
1971 1970                  return (return_val);
1972 1971          if (ps_pstop(ph_p) != PS_OK) {
1973 1972                  ph_unlock(th_p->th_ta_p);
1974 1973                  return (TD_DBERR);
1975 1974          }
1976 1975  
1977 1976          if (ps_lgetxregsize(ph_p, thr_to_lwpid(th_p), xregsize) != PS_OK)
1978 1977                  return_val = TD_DBERR;
1979 1978  
1980 1979          (void) ps_pcontinue(ph_p);
1981 1980          ph_unlock(th_p->th_ta_p);
1982 1981          return (return_val);
1983      -#else   /* __sparc */
1984      -        return (TD_NOXREGS);
1985      -#endif  /* __sparc */
1986 1982  }
1987 1983  
1988 1984  /*
1989 1985   * Get a thread's extra state register set.
1990 1986   */
1991 1987  #pragma weak td_thr_getxregs = __td_thr_getxregs
1992 1988  /* ARGSUSED */
1993 1989  td_err_e
1994 1990  __td_thr_getxregs(td_thrhandle_t *th_p, void *xregset)
1995 1991  {
1996      -#if defined(__sparc)
1997 1992          struct ps_prochandle *ph_p;
1998 1993          td_err_e return_val;
1999 1994  
2000 1995          if ((ph_p = ph_lock_th(th_p, &return_val)) == NULL)
2001 1996                  return (return_val);
2002 1997          if (ps_pstop(ph_p) != PS_OK) {
2003 1998                  ph_unlock(th_p->th_ta_p);
2004 1999                  return (TD_DBERR);
2005 2000          }
2006 2001  
2007 2002          if (ps_lgetxregs(ph_p, thr_to_lwpid(th_p), (caddr_t)xregset) != PS_OK)
2008 2003                  return_val = TD_DBERR;
2009 2004  
2010 2005          (void) ps_pcontinue(ph_p);
2011 2006          ph_unlock(th_p->th_ta_p);
2012 2007          return (return_val);
2013      -#else   /* __sparc */
2014      -        return (TD_NOXREGS);
2015      -#endif  /* __sparc */
2016 2008  }
2017 2009  
2018 2010  /*
2019 2011   * Set a thread's extra state register set.
2020 2012   */
2021 2013  #pragma weak td_thr_setxregs = __td_thr_setxregs
2022 2014  /* ARGSUSED */
2023 2015  td_err_e
2024 2016  __td_thr_setxregs(td_thrhandle_t *th_p, const void *xregset)
2025 2017  {
2026      -#if defined(__sparc)
2027 2018          struct ps_prochandle *ph_p;
2028 2019          td_err_e return_val;
2029 2020  
2030 2021          if ((ph_p = ph_lock_th(th_p, &return_val)) == NULL)
2031 2022                  return (return_val);
2032 2023          if (ps_pstop(ph_p) != PS_OK) {
2033 2024                  ph_unlock(th_p->th_ta_p);
2034 2025                  return (TD_DBERR);
2035 2026          }
2036 2027  
2037 2028          if (ps_lsetxregs(ph_p, thr_to_lwpid(th_p), (caddr_t)xregset) != PS_OK)
2038 2029                  return_val = TD_DBERR;
2039 2030  
2040 2031          (void) ps_pcontinue(ph_p);
2041 2032          ph_unlock(th_p->th_ta_p);
2042 2033          return (return_val);
2043      -#else   /* __sparc */
2044      -        return (TD_NOXREGS);
2045      -#endif  /* __sparc */
2046 2034  }
2047 2035  
2048 2036  struct searcher {
2049 2037          psaddr_t        addr;
2050 2038          int             status;
2051 2039  };
2052 2040  
2053 2041  /*
2054 2042   * Check the struct thread address in *th_p again first
2055 2043   * value in "data".  If value in data is found, set second value
↓ open down ↓ 1002 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX