Print this page
5510 elfdump doesn't print the member header before pr_reg

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 ↓ 851 lines elided ↑ open up ↑
 852  852   * Dump register contents
 853  853   */
 854  854  static void
 855  855  dump_prgregset(note_state_t *state, const char *title)
 856  856  {
 857  857          sl_field_t      fdesc1, fdesc2;
 858  858          sl_fmtbuf_t     buf1, buf2;
 859  859          Conv_inv_buf_t  inv_buf1, inv_buf2;
 860  860          Word            w;
 861  861  
      862 +        fdesc1 = fdesc2 = state->ns_arch->prgregset->elt0;
 862  863          indent_enter(state, title, &fdesc1);
 863  864  
 864      -        fdesc1 = fdesc2 = state->ns_arch->prgregset->elt0;
 865  865          for (w = 0; w < fdesc1.slf_nelts; ) {
 866  866                  if (w == (fdesc1.slf_nelts - 1)) {
 867  867                          /* One last register is left */
 868  868                          if (!data_present(state, &fdesc1))
 869  869                                  break;
 870  870                          dbg_print(0, MSG_ORIG(MSG_CNOTE_FMT_LINE),
 871  871                              INDENT, state->ns_vcol - state->ns_indent,
 872  872                              conv_cnote_pr_regname(state->ns_mach, w,
 873  873                              CONV_FMT_DECIMAL, &inv_buf1),
 874  874                              fmt_num(state, &fdesc1, SL_FMT_NUM_ZHEX, buf1));
↓ open down ↓ 45 lines elided ↑ open up ↑
 920  920                  print_str(state, MSG_ORIG(MSG_CNOTE_T_PR_FLAGS),
 921  921                      conv_cnote_pr_flags(w, 0, &conv_buf.flags));
 922  922          }
 923  923  
 924  924          PRINT_DEC(MSG_ORIG(MSG_CNOTE_T_PR_LWPID), pr_lwpid);
 925  925  
 926  926          if (data_present(state, &layout->pr_why)) {
 927  927                  w = extract_as_word(state, &layout->pr_why);
 928  928                  print_str(state, MSG_ORIG(MSG_CNOTE_T_PR_WHY),
 929  929                      conv_cnote_pr_why(w, 0, &conv_buf.inv));
 930      -        }
 931  930  
 932      -        if (data_present(state, &layout->pr_what)) {
 933      -                w2 = extract_as_word(state, &layout->pr_what);
 934      -                print_str(state, MSG_ORIG(MSG_CNOTE_T_PR_WHAT),
 935      -                    conv_cnote_pr_what(w, w2, 0, &conv_buf.inv));
      931 +                if (data_present(state, &layout->pr_what)) {
      932 +                        w2 = extract_as_word(state, &layout->pr_what);
      933 +                        print_str(state, MSG_ORIG(MSG_CNOTE_T_PR_WHAT),
      934 +                            conv_cnote_pr_what(w, w2, 0, &conv_buf.inv));
      935 +                }
 936  936          }
 937  937  
 938  938          if (data_present(state, &layout->pr_cursig)) {
 939  939                  w = extract_as_word(state, &layout->pr_cursig);
 940  940                  print_str(state, MSG_ORIG(MSG_CNOTE_T_PR_CURSIG),
 941  941                      conv_cnote_signal(w, CONV_FMT_DECIMAL, &conv_buf.inv));
 942  942          }
 943  943  
 944  944          PRINT_SUBTYPE(MSG_ORIG(MSG_CNOTE_T_PR_INFO), pr_info, dump_siginfo);
 945  945          PRINT_SUBTYPE(MSG_ORIG(MSG_CNOTE_T_PR_LWPPEND), pr_lwppend,
↓ open down ↓ 179 lines elided ↑ open up ↑
1125 1125          if (data_present(state, &layout->pr_flags)) {
1126 1126                  w = extract_as_word(state, &layout->pr_flags);
1127 1127                  print_str(state, MSG_ORIG(MSG_CNOTE_T_PR_FLAGS),
1128 1128                      conv_cnote_old_pr_flags(w, 0, &conv_buf.flags));
1129 1129          }
1130 1130  
1131 1131          if (data_present(state, &layout->pr_why)) {
1132 1132                  w = extract_as_word(state, &layout->pr_why);
1133 1133                  print_str(state, MSG_ORIG(MSG_CNOTE_T_PR_WHY),
1134 1134                      conv_cnote_pr_why(w, 0, &conv_buf.inv));
1135      -        }
1136 1135  
1137      -        if (data_present(state, &layout->pr_what)) {
1138      -                w2 = extract_as_word(state, &layout->pr_what);
1139      -                print_str(state, MSG_ORIG(MSG_CNOTE_T_PR_WHAT),
1140      -                    conv_cnote_pr_what(w, w2, 0, &conv_buf.inv));
     1136 +
     1137 +                if (data_present(state, &layout->pr_what)) {
     1138 +                        w2 = extract_as_word(state, &layout->pr_what);
     1139 +                        print_str(state, MSG_ORIG(MSG_CNOTE_T_PR_WHAT),
     1140 +                            conv_cnote_pr_what(w, w2, 0, &conv_buf.inv));
     1141 +                }
1141 1142          }
1142 1143  
1143 1144          PRINT_SUBTYPE(MSG_ORIG(MSG_CNOTE_T_PR_INFO), pr_info, dump_siginfo);
1144 1145  
1145 1146          if (data_present(state, &layout->pr_cursig)) {
1146 1147                  w = extract_as_word(state, &layout->pr_cursig);
1147 1148                  print_str(state, MSG_ORIG(MSG_CNOTE_T_PR_CURSIG),
1148 1149                      conv_cnote_signal(w, CONV_FMT_DECIMAL, &conv_buf.inv));
1149 1150          }
1150 1151  
↓ open down ↓ 712 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX