'Set argument list with cyclic pattern
Set "pattern" option for basic/extended pattern type
Usage:
MYNAME size1 [size2,offset2] ...'

def pattern_arg(self, *arg):

    if (not arg):
        self._missing_argument()
    arglist = []
    for a in arg:
        (size, offset) = (a + ',').split(',')[:2]
        if offset:
            offset = to_int(offset)
        else:
            offset = 0
        size = to_int(size)
        if ((size is None) or (offset is None)):
            self._missing_argument()
        if (arglist and (offset == 0)):
            offset = sum(arglist[(-1)])
        arglist += [(size, offset)]
    patterns = []
    for (s, o) in arglist:
        patterns += [("'%s'" % cyclic_pattern(s, o).decode('utf-8'))]
    peda.execute(('set    arg    %s' % '    '.join(patterns)))
    msg(('Set    %d    arguments    to    program' % len(patterns)))
    return
