GNU Binutils with patches for OS216
修訂 | dfe2491d5875fb2dc316e114a3e1f2737cd056ec (tree) |
---|---|
時間 | 2019-09-23 22:12:54 |
作者 | Nick Alcock <nick.alcock@orac...> |
Commiter | Nick Alcock |
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.
@@ -1,5 +1,9 @@ | ||
1 | 1 | 2019-07-13 Nick Alcock <nick.alcock@oracle.com> |
2 | 2 | |
3 | + * ctf-dump.c (ctf_dump_funcs): Check the right error value. | |
4 | + | |
5 | +2019-07-13 Nick Alcock <nick.alcock@oracle.com> | |
6 | + | |
3 | 7 | * ctf-dump.c (ctf_dump): Use ctf_type_iter_all to dump types, not |
4 | 8 | ctf_type_iter. |
5 | 9 | (ctf_dump_type): Pass down the flag from ctf_type_iter_all. |
@@ -401,7 +401,8 @@ ctf_dump_funcs (ctf_file_t *fp, ctf_dump_state_t *state) | ||
401 | 401 | case ECTF_NOSYMTAB: |
402 | 402 | return -1; |
403 | 403 | case ECTF_NOTDATA: |
404 | - case ECTF_NOTYPEDAT: | |
404 | + case ECTF_NOTFUNC: | |
405 | + case ECTF_NOFUNCDAT: | |
405 | 406 | continue; |
406 | 407 | } |
407 | 408 | if ((args = calloc (fi.ctc_argc, sizeof (ctf_id_t))) == NULL) |