Print this page
10823 should ignore DW_TAG_subprogram with DW_AT_declaration tags
10824 GCC7-derived CTF can double qualifiers on arrays
10825 ctfdump -c drops last type
10826 ctfdump -c goes off the rails with a missing parent
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Jason King <jason.king@joyent.com>
Approved by: Jerry Jelinek <jerry.jelinek@joyent.com>


   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 
  23 /*
  24  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  25  * Use is subject to license terms.
  26  */
  27 /*
  28  * Copyright (c) 2015, Joyent, Inc.  All rights reserved.
  29  */
  30 
  31 #ifndef _CTF_IMPL_H
  32 #define _CTF_IMPL_H
  33 
  34 #include <sys/types.h>
  35 #include <sys/errno.h>
  36 #include <sys/sysmacros.h>
  37 #include <sys/ctf_api.h>
  38 
  39 #ifdef _KERNEL
  40 
  41 #include <sys/systm.h>
  42 #include <sys/cmn_err.h>
  43 #include <sys/varargs.h>
  44 #include <sys/ddi.h>
  45 #include <sys/sunddi.h>
  46 
  47 #define isspace(c) \
  48         ((c) == ' ' || (c) == '\t' || (c) == '\n' || \


 298 extern void *ctf_data_alloc(size_t);
 299 extern void ctf_data_free(void *, size_t);
 300 extern void ctf_data_protect(void *, size_t);
 301 
 302 extern void *ctf_alloc(size_t);
 303 extern void ctf_free(void *, size_t);
 304 
 305 extern char *ctf_strdup(const char *);
 306 extern const char *ctf_strerror(int);
 307 extern void ctf_dprintf(const char *, ...);
 308 
 309 extern void *ctf_zopen(int *);
 310 
 311 extern ctf_id_t ctf_add_encoded(ctf_file_t *, uint_t, const char *,
 312     const ctf_encoding_t *, uint_t);
 313 extern ctf_id_t ctf_add_reftype(ctf_file_t *, uint_t, const char *, ctf_id_t,
 314     uint_t);
 315 extern boolean_t ctf_sym_valid(uintptr_t, int, uint16_t, uint64_t,
 316     uint32_t);
 317 



 318 extern const char _CTF_SECTION[];       /* name of CTF ELF section */
 319 extern const char _CTF_NULLSTR[];       /* empty string */
 320 
 321 extern int _libctf_version;             /* library client version */
 322 extern int _libctf_debug;               /* debugging messages enabled */
 323 
 324 #ifdef  __cplusplus
 325 }
 326 #endif
 327 
 328 #endif  /* _CTF_IMPL_H */


   8  *
   9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  10  * or http://www.opensolaris.org/os/licensing.
  11  * See the License for the specific language governing permissions
  12  * and limitations under the License.
  13  *
  14  * When distributing Covered Code, include this CDDL HEADER in each
  15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  16  * If applicable, add the following below this CDDL HEADER, with the
  17  * fields enclosed by brackets "[]" replaced with your own identifying
  18  * information: Portions Copyright [yyyy] [name of copyright owner]
  19  *
  20  * CDDL HEADER END
  21  */
  22 
  23 /*
  24  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
  25  * Use is subject to license terms.
  26  */
  27 /*
  28  * Copyright 2019, Joyent, Inc.
  29  */
  30 
  31 #ifndef _CTF_IMPL_H
  32 #define _CTF_IMPL_H
  33 
  34 #include <sys/types.h>
  35 #include <sys/errno.h>
  36 #include <sys/sysmacros.h>
  37 #include <sys/ctf_api.h>
  38 
  39 #ifdef _KERNEL
  40 
  41 #include <sys/systm.h>
  42 #include <sys/cmn_err.h>
  43 #include <sys/varargs.h>
  44 #include <sys/ddi.h>
  45 #include <sys/sunddi.h>
  46 
  47 #define isspace(c) \
  48         ((c) == ' ' || (c) == '\t' || (c) == '\n' || \


 298 extern void *ctf_data_alloc(size_t);
 299 extern void ctf_data_free(void *, size_t);
 300 extern void ctf_data_protect(void *, size_t);
 301 
 302 extern void *ctf_alloc(size_t);
 303 extern void ctf_free(void *, size_t);
 304 
 305 extern char *ctf_strdup(const char *);
 306 extern const char *ctf_strerror(int);
 307 extern void ctf_dprintf(const char *, ...);
 308 
 309 extern void *ctf_zopen(int *);
 310 
 311 extern ctf_id_t ctf_add_encoded(ctf_file_t *, uint_t, const char *,
 312     const ctf_encoding_t *, uint_t);
 313 extern ctf_id_t ctf_add_reftype(ctf_file_t *, uint_t, const char *, ctf_id_t,
 314     uint_t);
 315 extern boolean_t ctf_sym_valid(uintptr_t, int, uint16_t, uint64_t,
 316     uint32_t);
 317 
 318 extern const ctf_type_t *ctf_dyn_lookup_by_id(ctf_file_t *, ctf_id_t);
 319 extern int ctf_dyn_array_info(ctf_file_t *, ctf_id_t, ctf_arinfo_t *);
 320 
 321 extern const char _CTF_SECTION[];       /* name of CTF ELF section */
 322 extern const char _CTF_NULLSTR[];       /* empty string */
 323 
 324 extern int _libctf_version;             /* library client version */
 325 extern int _libctf_debug;               /* debugging messages enabled */
 326 
 327 #ifdef  __cplusplus
 328 }
 329 #endif
 330 
 331 #endif  /* _CTF_IMPL_H */