def METHOD_NAME(self) -> typing.Iterator:
    with self.ch.with_prompt(GDB_PROMPT):
        streams_orig = self.ch._streams
        try:
            for i in range(4):
                res = self.ch.expect(
                    [
                        "(gdb) ",
                        "Enable debuginfod for this session?",
                        "--Type <RET> for more, q to quit, c to continue without paging--",
                    ],
                    timeout=5,
                )
                if res.i == 0:
                    # We hit the prompt, nice!
                    break
                elif res.i == 1:
                    # Say no to debuginfod
                    self.ch.sendline("n")
                elif res.i == 2:
                    # When pagination comes up during startup, don't paginate
                    self.ch.sendline("c")
            else:
                raise Exception("could not reach gdb prompt")
            self.ch._streams = []
            self.ch.sendline(b"set prompt " + GDB_PROMPT, True)
            self.ch.read_until_prompt()
            self.ch.sendline("set confirm off")
            self.ch.read_until_prompt()
            self.ch.sendline("set pagination off")
            self.ch.read_until_prompt()
            # Disable styling so output is not clobbered with escape sequences
            self.ch.sendline("set style enabled off")
            self.ch.read_until_prompt()
            self._gdb_at_prompt = True
            yield None
        finally:
            self.ch._streams = streams_orig