aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Alcock <nick.alcock@oracle.com>2019-07-13 20:50:49 +0100
committerNick Alcock <nick.alcock@oracle.com>2019-09-23 14:12:54 +0100
commitdfe2491d5875fb2dc316e114a3e1f2737cd056ec (patch)
tree703747ad35babde9de5d40abda43d3c48f0af0ac
parent2ddf769f8bf96b6a62d009166c3274c3de17b338 (diff)
downloadfsf-binutils-gdb-dfe2491d5875fb2dc316e114a3e1f2737cd056ec.zip
fsf-binutils-gdb-dfe2491d5875fb2dc316e114a3e1f2737cd056ec.tar.gz
fsf-binutils-gdb-dfe2491d5875fb2dc316e114a3e1f2737cd056ec.tar.bz2
libctf: dump: check the right error values when dumping functions
We weren't correctly detecting when there were no functions to dump in the function info table, because we were checking for ECTF_NOTYPEDAT, which means there are no *data objects* to dump. Adjust accordingly. libctf/ * ctf-dump.c (ctf_dump_funcs): Check the right error value.
-rw-r--r--libctf/ChangeLog4
-rw-r--r--libctf/ctf-dump.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/libctf/ChangeLog b/libctf/ChangeLog
index 2000e98..05d66cf 100644
--- a/libctf/ChangeLog
+++ b/libctf/ChangeLog
@@ -1,5 +1,9 @@
2019-07-13 Nick Alcock <nick.alcock@oracle.com>
+ * ctf-dump.c (ctf_dump_funcs): Check the right error value.
+
+2019-07-13 Nick Alcock <nick.alcock@oracle.com>
+
* ctf-dump.c (ctf_dump): Use ctf_type_iter_all to dump types, not
ctf_type_iter.
(ctf_dump_type): Pass down the flag from ctf_type_iter_all.
diff --git a/libctf/ctf-dump.c b/libctf/ctf-dump.c
index 46613bd..3d66411 100644
--- a/libctf/ctf-dump.c
+++ b/libctf/ctf-dump.c
@@ -401,7 +401,8 @@ ctf_dump_funcs (ctf_file_t *fp, ctf_dump_state_t *state)
case ECTF_NOSYMTAB:
return -1;
case ECTF_NOTDATA:
- case ECTF_NOTYPEDAT:
+ case ECTF_NOTFUNC:
+ case ECTF_NOFUNCDAT:
continue;
}
if ((args = calloc (fi.ctc_argc, sizeof (ctf_id_t))) == NULL)