def METHOD_NAME(self) -> str:
    """
    Read GDB's output until we reach the next prompt.
    Return the output in between. Raise a RuntimeError if GDB dies or if
    timeout is reached.
    """
    assert self.alive
    status = self.proc.expect([self.PROMPT_RE], self.TIMEOUT)
    if status is EXPECT_DIED:
        raise RuntimeError("GDB died")
    elif status is EXPECT_TIMEOUT:
        raise RuntimeError("Timeout reached while waiting for GDB")
    assert status == 0
    out, prompt = self.proc.out()
    return out