Print this page
8158 Want named threads API
9857 proc manpages should have LIBRARY section

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/sgs/elfdump/common/corenote.c
          +++ new/usr/src/cmd/sgs/elfdump/common/corenote.c
↓ open down ↓ 1248 lines elided ↑ open up ↑
1249 1249                      conv_cnote_psetid(i, CONV_FMT_DECIMAL, &conv_buf.inv));
1250 1250          }
1251 1251  
1252 1252          PRINT_ZHEX(MSG_ORIG(MSG_CNOTE_T_PR_INSTR), pr_instr);
1253 1253          PRINT_SUBTYPE(MSG_ORIG(MSG_CNOTE_T_PR_REG), pr_reg, dump_prgregset);
1254 1254  
1255 1255          indent_exit(state);
1256 1256  }
1257 1257  
1258 1258  
     1259 +static void
     1260 +dump_lwpname(note_state_t *state, const char *title)
     1261 +{
     1262 +        const sl_prlwpname_layout_t *layout = state->ns_arch->prlwpname;
     1263 +
     1264 +        indent_enter(state, title, &layout->pr_lwpid);
     1265 +
     1266 +        PRINT_DEC(MSG_ORIG(MSG_CNOTE_T_PR_LWPID), pr_lwpid);
     1267 +        PRINT_STRBUF(MSG_ORIG(MSG_CNOTE_T_PR_LWPNAME), pr_lwpname);
     1268 +
     1269 +        indent_exit(state);
     1270 +}
     1271 +
     1272 +
1259 1273  /*
1260 1274   * Print percent from 16-bit binary fraction [0 .. 1]
1261 1275   * Round up .01 to .1 to indicate some small percentage (the 0x7000 below).
1262 1276   *
1263 1277   * Note: This routine was copied from ps(1) and then modified.
1264 1278   */
1265 1279  static const char *
1266 1280  prtpct_value(note_state_t *state, const sl_field_t *fdesc,
1267 1281      sl_fmtbuf_t buf)
1268 1282  {
↓ open down ↓ 633 lines elided ↑ open up ↑
1902 1916                  state.ns_v2col = 58;
1903 1917                  dump_psinfo(&state, MSG_ORIG(MSG_CNOTE_DESC_PSINFO_T));
1904 1918                  return (CORENOTE_R_OK);
1905 1919  
1906 1920          case NT_SECFLAGS:
1907 1921                  state.ns_vcol = 23;
1908 1922                  state.ns_t2col = 41;
1909 1923                  state.ns_v2col = 54;
1910 1924                  dump_secflags(&state, MSG_ORIG(MSG_CNOTE_DESC_PRSECFLAGS_T));
1911 1925                  return (CORENOTE_R_OK);
     1926 +
     1927 +        case NT_LWPNAME:
     1928 +                state.ns_vcol = 20;
     1929 +                dump_lwpname(&state, MSG_ORIG(MSG_CNOTE_DESC_PRLWPNAME_T));
     1930 +                return (CORENOTE_R_OK);
1912 1931          }
1913 1932  
1914 1933          return (CORENOTE_R_BADTYPE);
1915 1934  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX