diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-09-12 08:20:05 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-09-12 08:20:05 +0000 |
commit | 6a451158c1ca085d46c0e56db8e257e33459f242 (patch) | |
tree | 094e82ae9ea9a2d534240fe29209a873a207dd10 /sys | |
parent | 8a0b7cb27ead74f33e147b52644a5b92a505f0f8 (diff) |
Skip forward declarations until ctfconv(1) properly merge them with
the corresponding struct definitions.
ok dlg@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ddb/db_ctf.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/ddb/db_ctf.c b/sys/ddb/db_ctf.c index 6b67b962e84..b2c225baf77 100644 --- a/sys/ddb/db_ctf.c +++ b/sys/ddb/db_ctf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_ctf.c,v 1.20 2017/09/08 05:36:52 deraadt Exp $ */ +/* $OpenBSD: db_ctf.c,v 1.21 2017/09/12 08:20:04 mpi Exp $ */ /* * Copyright (c) 2016-2017 Martin Pieuchot @@ -293,6 +293,13 @@ db_ctf_type_by_name(const char *name, unsigned int kind) if (CTF_INFO_KIND(ctt->ctt_info) != kind) continue; + /* + * Skip forward declaration that shouldn't be inserted + * by ctfconv(1). + */ + if (kind == CTF_K_STRUCT && ctt->ctt_size == 0) + continue; + tname = db_ctf_off2name(ctt->ctt_name); if (tname == NULL) continue; |