From d18f9f16299170e94a3d2e8a45aa349a25278aa3 Mon Sep 17 00:00:00 2001 From: Nick Alcock Date: Sat, 13 Jul 2019 20:50:49 +0100 Subject: [PATCH] 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. --- libctf/ChangeLog | 4 ++++ libctf/ctf-dump.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libctf/ChangeLog b/libctf/ChangeLog index 09353da012..c23e5aedcf 100644 --- a/libctf/ChangeLog +++ b/libctf/ChangeLog @@ -1,3 +1,7 @@ +2019-07-13 Nick Alcock + + * ctf-dump.c (ctf_dump_funcs): Check the right error value. + 2019-07-13 Nick Alcock * ctf-dump.c (ctf_dump): Use ctf_type_iter_all to dump types, not diff --git a/libctf/ctf-dump.c b/libctf/ctf-dump.c index 0c0c2246b5..2a888e1363 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) -- 2.34.1