From 495dfd0ac49c1326af24c839ba967d1e8264782d Mon Sep 17 00:00:00 2001 From: John Levon Date: Fri, 8 Mar 2019 17:40:00 +0000 Subject: OS-6428 bad free in ctf_dwarf_init_die OS-6486 ctfconvert -i never converts OS-6488 ctfconvert should handle empty dies OS-6505 Improve ctfconvert error messages OS-7639 ctfconvert -i option is mis-handled OS-7663 ctf_dwarf_convert_type() relies on un-initialized id OS-7688 shouldn't build gcore.c as part of kmdb Reviewed by: Robert Mustacchi Reviewed by: Jerry Jelinek Approved by: Robert Mustacchi --- usr/src/lib/libctf/common/libctf.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'usr/src/lib/libctf/common/libctf.h') diff --git a/usr/src/lib/libctf/common/libctf.h b/usr/src/lib/libctf/common/libctf.h index a5c5027048..78b0a7a786 100644 --- a/usr/src/lib/libctf/common/libctf.h +++ b/usr/src/lib/libctf/common/libctf.h @@ -24,7 +24,7 @@ * Use is subject to license terms. */ /* - * Copyright (c) 2015, Joyent, Inc. + * Copyright (c) 2019, Joyent, Inc. */ /* @@ -75,12 +75,25 @@ 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_elfconvert(int, Elf *, const char *, uint_t, uint_t, int *, char *, size_t); 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 *); -- cgit v1.2.3