This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH 13/19] libctf: dump: check the right error values when dumping functions
- From: Nick Alcock <nick dot alcock at oracle dot com>
- To: binutils at sourceware dot org
- Cc: elena dot zannoni at oracle dot com, jose dot marchesi at oracle dot com, indu dot bhagat at oracle dot com, egeyar dot bagcioglu at oracle dot com
- Date: Tue, 16 Jul 2019 19:04:14 +0100
- Subject: [PATCH 13/19] libctf: dump: check the right error values when dumping functions
- References: <20190716180420.236506-1-nick.alcock@oracle.com>
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/ctf-dump.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libctf/ctf-dump.c b/libctf/ctf-dump.c
index 46613bd2c5..3d66411a70 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.22.0.238.g049a27acdc