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>


  12 /*
  13  * Copyright 2019 Joyent, Inc.
  14  */
  15 
  16 #ifndef _LIBCTF_IMPL_H
  17 #define _LIBCTF_IMPL_H
  18 
  19 /*
  20  * Portions of libctf implementations that are only suitable for CTF's userland
  21  * library, eg. converting and merging related routines.
  22  */
  23 
  24 #include <libelf.h>
  25 #include <libctf.h>
  26 #include <ctf_impl.h>
  27 
  28 #ifdef __cplusplus
  29 extern "C" {
  30 #endif
  31 
  32 typedef enum ctf_conv_status {
  33         CTF_CONV_SUCCESS        = 0,
  34         CTF_CONV_ERROR          = 1,
  35         CTF_CONV_NOTSUP         = 2
  36 } ctf_conv_status_t;
  37 
  38 typedef ctf_conv_status_t (*ctf_convert_f)(int, Elf *, uint_t, int *,
  39     ctf_file_t **, char *, size_t);
  40 extern ctf_conv_status_t ctf_dwarf_convert(int, Elf *, uint_t, int *,
  41     ctf_file_t **, char *, size_t);
  42 
  43 /*
  44  * Symbol walking
  45  */
  46 typedef int (*ctf_symtab_f)(const Elf64_Sym *, ulong_t, const char *,
  47     const char *, boolean_t, void *);
  48 extern int ctf_symtab_iter(ctf_file_t *, ctf_symtab_f, void *);
  49 
  50 /*
  51  * zlib compression routines
  52  */
  53 extern int ctf_compress(ctf_file_t *fp, void **, size_t *, size_t *);
  54 
  55 extern int ctf_diff_self(ctf_diff_t *, ctf_diff_type_f, void *);
  56 
  57 /*
  58  * Internal debugging aids
  59  */
  60 extern void ctf_phase_dump(ctf_file_t *, const char *, const char *);


  12 /*
  13  * Copyright 2019 Joyent, Inc.
  14  */
  15 
  16 #ifndef _LIBCTF_IMPL_H
  17 #define _LIBCTF_IMPL_H
  18 
  19 /*
  20  * Portions of libctf implementations that are only suitable for CTF's userland
  21  * library, eg. converting and merging related routines.
  22  */
  23 
  24 #include <libelf.h>
  25 #include <libctf.h>
  26 #include <ctf_impl.h>
  27 
  28 #ifdef __cplusplus
  29 extern "C" {
  30 #endif
  31 
  32 typedef int (*ctf_convert_f)(int, Elf *, uint_t, uint_t,






  33     ctf_file_t **, char *, size_t);
  34 extern int ctf_dwarf_convert(int, Elf *, uint_t, uint_t,
  35     ctf_file_t **, char *, size_t);
  36 
  37 /*
  38  * Symbol walking
  39  */
  40 typedef int (*ctf_symtab_f)(const Elf64_Sym *, ulong_t, const char *,
  41     const char *, boolean_t, void *);
  42 extern int ctf_symtab_iter(ctf_file_t *, ctf_symtab_f, void *);
  43 
  44 /*
  45  * zlib compression routines
  46  */
  47 extern int ctf_compress(ctf_file_t *fp, void **, size_t *, size_t *);
  48 
  49 extern int ctf_diff_self(ctf_diff_t *, ctf_diff_type_f, void *);
  50 
  51 /*
  52  * Internal debugging aids
  53  */
  54 extern void ctf_phase_dump(ctf_file_t *, const char *, const char *);