summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2017-11-03 12:55:44 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2017-11-03 12:55:44 +0000
commitba187e812aff7c2cf0c997fa8b1c002d42a2167f (patch)
tree8f6cde084f12fd6e983f205ae82c3b1135bab1d3 /usr.bin
parentb5bdb568a598aea5f9a94ba7a91e5d41fe9e458e (diff)
Make dump_itype() dump enum members.
From Mark Johnston, markj@FreeBSD
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ctfconv/ctfconv.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/ctfconv/ctfconv.c b/usr.bin/ctfconv/ctfconv.c
index c14d046fef5..31eb7bc7fb0 100644
--- a/usr.bin/ctfconv/ctfconv.c
+++ b/usr.bin/ctfconv/ctfconv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ctfconv.c,v 1.14 2017/11/03 12:54:50 mpi Exp $ */
+/* $OpenBSD: ctfconv.c,v 1.15 2017/11/03 12:55:43 mpi Exp $ */
/*
* Copyright (c) 2016-2017 Martin Pieuchot
@@ -423,7 +423,11 @@ dump_type(struct itype *it)
printf("\n");
break;
case CTF_K_ENUM:
- printf(" [%u] ENUM %s\n\n", it->it_idx, type_name(it));
+ printf(" [%u] ENUM %s\n", it->it_idx, type_name(it));
+ TAILQ_FOREACH(im, &it->it_members, im_next) {
+ printf("\t%s = %zu\n", im_name(im), im->im_ref);
+ }
+ printf("\n");
break;
case CTF_K_FUNCTION:
printf(" [%u] FUNCTION (%s) returns: %u args: (",