Print this page
10816 ctf_dwarf_convert_type() relies on un-initialized id
10817 ctfconvert -i option is mis-handled
10818 Improve ctfconvert error messages
10819 ctfconvert should handle empty dies
10820 ctfconvert -i never converts
10821 bad free in ctf_dwarf_init_die
10815 shouldn't build gcore.c as part of kmdb
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/common/ctf/ctf_error.c
          +++ new/usr/src/common/ctf/ctf_error.c
↓ open down ↓ 16 lines elided ↑ open up ↑
  17   17   * fields enclosed by brackets "[]" replaced with your own identifying
  18   18   * information: Portions Copyright [yyyy] [name of copyright owner]
  19   19   *
  20   20   * CDDL HEADER END
  21   21   */
  22   22  /*
  23   23   * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
  24   24   * Use is subject to license terms.
  25   25   */
  26   26  /*
  27      - * Copyright (c) 2015, Joyent, Inc.
       27 + * Copyright (c) 2019, Joyent, Inc.
  28   28   */
  29   29  
  30   30  #include <ctf_impl.h>
  31   31  
  32   32  static const char *const _ctf_errlist[] = {
  33   33          "File is not in CTF or ELF format",              /* ECTF_FMT */
  34   34          "File uses more recent ELF version than libctf", /* ECTF_ELFVERS */
  35   35          "File uses more recent CTF version than libctf", /* ECTF_CTFVERS */
  36   36          "File is a different endian-ness than libctf",   /* ECTF_ENDIAN */
  37   37          "Symbol table uses invalid entry size",          /* ECTF_SYMTAB */
↓ open down ↓ 38 lines elided ↑ open up ↑
  76   76          "Conflicting type is already defined",           /* ECTF_CONFLICT */
  77   77          "Type has outstanding references",               /* ECTF_REFERENCED */
  78   78          "Type is not a dynamic type",                    /* ECTF_NOTDYN */
  79   79          "Elf library failure",                           /* ECTF_ELF */
  80   80          "Cannot merge child container",                  /* ECTF_MCHILD */
  81   81          "Label already exists",                          /* ECTF_LABEL */
  82   82          "Merged labels conflict",                        /* ECTF_LCONFLICT */
  83   83          "Zlib library failure",                          /* ECTF_ZLIB */
  84   84          "CTF conversion backend error",                  /* ECTF_CONVBKERR */
  85   85          "No C source to convert from",                   /* ECTF_CONVNOCSRC */
  86      -        "No applicable conversion backend"               /* ECTF_NOCONVBKEND */
       86 +        "No debug info found to convert from"            /* ECTF_CONVNODEBUG */
  87   87  };
  88   88  
  89   89  static const int _ctf_nerr = sizeof (_ctf_errlist) / sizeof (_ctf_errlist[0]);
  90   90  
  91   91  const char *
  92   92  ctf_errmsg(int error)
  93   93  {
  94   94          const char *str;
  95   95  
  96   96          if (error >= ECTF_BASE && (error - ECTF_BASE) < _ctf_nerr)
↓ open down ↓ 12 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX