Print this page
12259 CTF shouldn't assume enum size

*** 23,33 **** /* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* ! * Copyright 2018 Joyent, Inc. */ #include <ctf_impl.h> #include <sys/debug.h> --- 23,33 ---- /* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ /* ! * Copyright 2020 Joyent, Inc. */ #include <ctf_impl.h> #include <sys/debug.h>
*** 479,489 **** case CTF_K_FORWARD: return (0); case CTF_K_ENUM: ! return (fp->ctf_dmodel->ctd_int); case CTF_K_ARRAY: /* * Array size is not directly returned by stabs data. Instead, * it defines the element type and requires the user to perform --- 479,489 ---- case CTF_K_FORWARD: return (0); case CTF_K_ENUM: ! return (ctf_get_ctt_size(fp, tp, NULL, NULL)); case CTF_K_ARRAY: /* * Array size is not directly returned by stabs data. Instead, * it defines the element type and requires the user to perform
*** 576,587 **** return (align); } case CTF_K_ENUM: - return (fp->ctf_dmodel->ctd_int); - default: return (ctf_get_ctt_size(fp, tp, NULL, NULL)); } } --- 576,585 ----