diff options
author | markj <markj@FreeBSD.org> | 2016-08-31 01:27:30 +0000 |
---|---|---|
committer | markj <markj@FreeBSD.org> | 2016-08-31 01:27:30 +0000 |
commit | fc3ed68cabde0f33ae57d25d0a8a537d9b69a30e (patch) | |
tree | cd299ae692487ce3e59f4ed9b614fea6814ea26b /cddl/contrib/opensolaris/tools/ctf | |
parent | d8feb13e02c7681586150351a1684bbea3f54e5c (diff) | |
download | FreeBSD-src-fc3ed68cabde0f33ae57d25d0a8a537d9b69a30e.zip FreeBSD-src-fc3ed68cabde0f33ae57d25d0a8a537d9b69a30e.tar.gz |
MFC r304055:
Fix handling of forward enum declarations in the CTF tools.
Diffstat (limited to 'cddl/contrib/opensolaris/tools/ctf')
-rw-r--r-- | cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c | 5 | ||||
-rw-r--r-- | cddl/contrib/opensolaris/tools/ctf/cvt/merge.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c index 5725401..96beb72 100644 --- a/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c +++ b/cddl/contrib/opensolaris/tools/ctf/cvt/dwarf.c @@ -807,6 +807,11 @@ die_enum_create(dwarf_t *dw, Dwarf_Die die, Dwarf_Off off, tdesc_t *tdp) Dwarf_Unsigned uval; Dwarf_Signed sval; + if (die_isdecl(dw, die)) { + tdp->t_type = FORWARD; + return; + } + debug(3, "die %llu: creating enum\n", off); tdp->t_type = ENUM; diff --git a/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c b/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c index 26b8d82..d8bc2a9 100644 --- a/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c +++ b/cddl/contrib/opensolaris/tools/ctf/cvt/merge.c @@ -348,7 +348,8 @@ fwd_equiv(tdesc_t *ctdp, tdesc_t *mtdp) { tdesc_t *defn = (ctdp->t_type == FORWARD ? mtdp : ctdp); - return (defn->t_type == STRUCT || defn->t_type == UNION); + return (defn->t_type == STRUCT || defn->t_type == UNION || + defn->t_type == ENUM); } static int |