'Get value of some or all registers
Returns:
- dictionary of {regname(String) : value(Int)}'

def getregs(self, reglist=None):

    if reglist:
        reglist = reglist.replace(',', '    ')
    else:
        reglist = ''
    regs = self.execute_redirect(('info    registers    %s' % reglist))
    if (not regs):
        return None
    result = {}
    if regs:
        for r in regs.splitlines():
            r = r.split()
            if ((len(r) > 1) and (to_int(r[1]) is not None)):
                result[r[0]] = to_int(r[1])
    return result
