Print this page
12364 mdb trips assertion related to autowrap

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/mdb/common/mdb/mdb_fmt.c
          +++ new/usr/src/cmd/mdb/common/mdb/mdb_fmt.c
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
  24      - * Copyright 2019 Joyent, Inc.
       24 + * Copyright 2020 Joyent, Inc.
  25   25   * Copyright (c) 2017 by Delphix. All rights reserved.
  26   26   */
  27   27  
  28   28  /*
  29   29   * Format String Decoder
  30   30   *
  31   31   * This file provides the core engine for converting strings of format
  32   32   * characters into formatted output.  The various format dcmds invoke the
  33   33   * mdb_fmt_print() function below with a target, address space identifier,
  34   34   * address, count, and format character, and it reads the required data from
↓ open down ↓ 691 lines elided ↑ open up ↑
 726  726          if (fmt < 0 || fmt > (sizeof (fmttab) / sizeof (fmttab[0]))) {
 727  727                  warn("invalid format character -- '%c'\n", fmt);
 728  728                  return (addr);
 729  729          }
 730  730  
 731  731          if (!(fp->f_type & FMT_NOAUTOWRAP)) {
 732  732                  /*
 733  733                   * Unless a format has explicitly opted out, we force autowrap
 734  734                   * for the duration of mdb_fmt_print().
 735  735                   */
 736      -                mdb.m_flags |= MDB_FL_AUTOWRAP;
      736 +                mdb_iob_set_autowrap(mdb.m_out);
 737  737          }
 738  738  
 739  739          switch (FMT_TYPE(fp->f_type)) {
 740  740          case FMT_FUNC:
 741  741                  funcp = (mdb_fmt_func_f *)fp->f_ptr;
 742  742                  addr = funcp(t, as, addr, cnt);
 743  743                  break;
 744  744  
 745  745          case FMT_PRINTF:
 746  746                  switch (fp->f_size) {
↓ open down ↓ 115 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX