Fix handling of forward enum declarations in the CTF tools.
Reported by: mmacy MFC after: 2 weeks
This commit is contained in:
parent
842ee21e20
commit
eb9da1ada8
@ -816,6 +816,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;
|
||||
|
@ -338,7 +338,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
|
||||
|
Loading…
Reference in New Issue
Block a user