Print this page
10812 ctf tools shouldn't add blank labels
10813 ctf symbol mapping needs work
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/common/ctf/ctf_create.c
          +++ new/usr/src/common/ctf/ctf_create.c
↓ open down ↓ 17 lines elided ↑ open up ↑
  18   18   * information: Portions Copyright [yyyy] [name of copyright owner]
  19   19   *
  20   20   * CDDL HEADER END
  21   21   */
  22   22  
  23   23  /*
  24   24   * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  25   25   * Use is subject to license terms.
  26   26   */
  27   27  /*
  28      - * Copyright (c) 2015, Joyent, Inc.
       28 + * Copyright (c) 2019, Joyent, Inc.
  29   29   */
  30   30  
  31   31  #include <sys/sysmacros.h>
  32   32  #include <sys/param.h>
  33   33  #include <sys/mman.h>
  34   34  #include <ctf_impl.h>
  35   35  #include <sys/debug.h>
  36   36  
  37   37  /*
  38   38   * This static string is used as the template for initially populating a
↓ open down ↓ 2080 lines elided ↑ open up ↑
2119 2119                  return (ctf_set_errno(fp, ECTF_LABELEXISTS));
2120 2120  
2121 2121          if ((dld = ctf_alloc(sizeof (ctf_dldef_t))) == NULL)
2122 2122                  return (ctf_set_errno(fp, EAGAIN));
2123 2123  
2124 2124          if ((dld->dld_name = ctf_strdup(name)) == NULL) {
2125 2125                  ctf_free(dld, sizeof (ctf_dldef_t));
2126 2126                  return (ctf_set_errno(fp, EAGAIN));
2127 2127          }
2128 2128  
     2129 +        ctf_dprintf("adding label %s, %ld\n", name, type);
2129 2130          dld->dld_type = type;
2130 2131          fp->ctf_dtstrlen += strlen(name) + 1;
2131 2132          ctf_dld_insert(fp, dld, position);
2132 2133          fp->ctf_flags |= LCTF_DIRTY;
2133 2134  
2134 2135          return (0);
2135 2136  }
2136 2137  
2137 2138  /*
2138 2139   * Update the size of a structure or union. Note that we don't allow this to
↓ open down ↓ 58 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX