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.
This commit is contained in:
Nick Alcock 2019-07-13 20:50:49 +01:00
parent b4f0e09cd1
commit d18f9f1629
2 changed files with 6 additions and 1 deletions

View file

@ -1,3 +1,7 @@
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

View file

@ -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)