]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
libctf: dump: check the right error values when dumping functions
authorNick Alcock <nick.alcock@oracle.com>
Sat, 13 Jul 2019 19:50:49 +0000 (20:50 +0100)
committerNick Alcock <nick.alcock@oracle.com>
Mon, 23 Sep 2019 13:12:54 +0000 (14:12 +0100)
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
libctf/ctf-dump.c

index 2000e98bebd0ae23b7a51bfdfc9f03ec89d6a650..05d66cf69ad2ecc5d34159139d8d2c0cbf6ee673 100644 (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
index 46613bd2c5d54bb56756fa8d374c39fa4bfa5a7f..3d66411a709202c4cd12e5da6fef3c61a3034bad 100644 (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)