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>

@@ -22,11 +22,11 @@
 /*
  * Copyright 2001-2003 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 /*
- * Copyright (c) 2015, Joyent, Inc.
+ * Copyright (c) 2019, Joyent, Inc.
  */
 
 /*
  * This header file defines the interfaces available from the CTF debugger
  * library, libctf.  This library provides functions that a debugger can

@@ -42,10 +42,11 @@
 
 #ifndef _LIBCTF_H
 #define _LIBCTF_H
 
 #include <sys/ctf_api.h>
+#include <libelf.h>
 
 #ifdef  __cplusplus
 extern "C" {
 #endif
 

@@ -72,14 +73,27 @@
 extern int ctf_diff_types(ctf_diff_t *, ctf_diff_type_f, void *);
 extern int ctf_diff_functions(ctf_diff_t *, ctf_diff_func_f, void *);
 extern int ctf_diff_objects(ctf_diff_t *, ctf_diff_obj_f, void *);
 extern void ctf_diff_fini(ctf_diff_t *);
 
-#define CTF_CONVERT_F_IGNNONC   0x01
+/*
+ * Normally, we return a failure if we find a C-derived compilation unit that
+ * lacks DWARF or CTF (as required).  This flag over-rides this check.
+ */
+#define CTF_ALLOW_MISSING_DEBUG 0x01
+
 extern ctf_file_t *ctf_fdconvert(int, const char *, uint_t, uint_t, int *,
     char *, size_t);
 
+typedef enum ctf_hsc_ret {
+        CHR_ERROR = -1,
+        CHR_NO_C_SOURCE = 0,
+        CHR_HAS_C_SOURCE = 1
+} ctf_hsc_ret_t;
+
+extern ctf_hsc_ret_t ctf_has_c_source(Elf *, char *, size_t);
+
 typedef struct ctf_merge_handle ctf_merge_t;
 extern ctf_merge_t *ctf_merge_init(int, int *);
 extern int ctf_merge_add(ctf_merge_t *, ctf_file_t *);
 extern int ctf_merge_set_nthreads(ctf_merge_t *, const uint_t);
 extern int ctf_merge_label(ctf_merge_t *, const char *);