diff options
author | Nick Alcock <nick.alcock@oracle.com> | 2019-07-13 20:50:49 +0100 |
---|---|---|
committer | Nick Alcock <nick.alcock@oracle.com> | 2019-10-03 17:04:55 +0100 |
commit | d18f9f16299170e94a3d2e8a45aa349a25278aa3 (patch) | |
tree | 15368a3264abea9df6f662a6068061569e2cb28c /libctf/ctf-dump.c | |
parent | b4f0e09cd18e0dbeeecd303ed54f6f113146e857 (diff) | |
download | fsf-binutils-gdb-d18f9f16299170e94a3d2e8a45aa349a25278aa3.zip fsf-binutils-gdb-d18f9f16299170e94a3d2e8a45aa349a25278aa3.tar.gz fsf-binutils-gdb-d18f9f16299170e94a3d2e8a45aa349a25278aa3.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.
Diffstat (limited to 'libctf/ctf-dump.c')
-rw-r--r-- | libctf/ctf-dump.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libctf/ctf-dump.c b/libctf/ctf-dump.c index 0c0c224..2a888e1 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) |