You can use a CPLD programmer to read back a CPLD - provided it is not encrpyted. The standard output file is a JEDEC fail usually with a .jed extension,
In this project we can read GAL 22v10s and reproduce a source file compatible with the CUPL compiler.