In an attempt to codesign gdb, I used an incorrect certificate, so now gdb is codesigned but does not work as expected.
I attempted to codesign gdb using the correct
I had a problem with removing signature as suggested by Micheal:
unsupported type or version of signature
Finally I used -f flag and force loaded new certificate.