]> git.ipfire.org Git - thirdparty/gcc.git/commit
gdbhooks.py: dump-fn, dot-fn: cast ret values of fopen/fclose
authorVladislav Ivanishin <vlad@ispras.ru>
Sun, 14 Jul 2019 13:19:29 +0000 (13:19 +0000)
committerVladislav Ivanishin <vlad@gcc.gnu.org>
Sun, 14 Jul 2019 13:19:29 +0000 (13:19 +0000)
commitcbfde6ee68dab649e3cf86b0ae569f2fc6ef3900
tree6408bdd7b6dee2f8eb7217f571adce583f53a614
parenta20f263ba1a76af40eb4e6734529739a2a30ed65
gdbhooks.py: dump-fn, dot-fn: cast ret values of fopen/fclose

Work around the following

    (gdb) Python Exception <class 'gdb.error'> 'fclose@@GLIBC_2.2.5' has
    unknown return type; cast the call to its declared return type:
    (gdb) Error occurred in Python: 'fclose@@GLIBC_2.2.5' has unknown
    return type; cast the call to its declared return type

This is due to GDB not being able to pick up and use the return types from
debug info for external declarations.

2019-07-14  Vladislav Ivanishin <vlad@ispras.ru>

        * gdbhooks.py (DumpFn.invoke): Add explicit casts of return values of
        fopen and fclose to their respective types.
        (DotFn.invoke): Ditto.

From-SVN: r273480
gcc/ChangeLog
gcc/gdbhooks.py