def METHOD_NAME(self) -> typing.Iterator[channel.Channel]:
    with self._host.run(self._gdb, "-nh", "-nx", *self._args) as ch:
        try:
            yield ch
        except linux.CommandEndedException:
            ch.terminate0()
            raise
        finally:
            if not ch.closed:
                if self._gdb_at_prompt:
                    tbot.log_event.command(self.name, "quit")
                    ch.sendline("quit")
                    ch.terminate0()
                else:
                    tbot.log.warning("Trying to abort GDB with ^C + `quit`...")
                    ch.sendcontrol("C")
                    try:
                        ch.read_until_timeout(5)
                    except linux.CommandEndedException:
                        ch.terminate()
                    else:
                        tbot.log_event.command(self.name, "quit")
                        ch.sendline("quit")
                        ch.terminate()