https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118260
--- Comment #14 from Jonathan Wakely <redi at gcc dot gnu.org> --- Thanks. I don't think we need to check the string, if an error occurs then we get an exception anyway: Python Exception <class 'gdb.error'>: Undefined command: "skap". Try "help". (triggered by replacing one of the gdb.execute('skip -rfu ...') commands with 'skap' instead)