'Execute until the function returns (or until something else makes it
stop)'

def _finish(self):

    if (gdb.selected_frame().older() is not None):
        return gdb.execute('finish', to_string=True)
    else:
        return gdb.execute('cont', to_string=True)
