'Get flags value from EFLAGS register
Returns:
- dictionary of named flags'

def get_eflags(self):

    EFLAGS_CF = (1 << 0)
    EFLAGS_PF = (1 << 2)
    EFLAGS_AF = (1 << 4)
    EFLAGS_ZF = (1 << 6)
    EFLAGS_SF = (1 << 7)
    EFLAGS_TF = (1 << 8)
    EFLAGS_IF = (1 << 9)
    EFLAGS_DF = (1 << 10)
    EFLAGS_OF = (1 << 11)
    flags = {'CF': 0, 'PF': 0, 'AF': 0, 'ZF': 0, 'SF': 0, 'TF': 0, 'IF': 0, 'DF': 0, 'OF': 0}
    eflags = self.getreg('eflags')
    if (not eflags):
        return None
    flags['CF'] = bool((eflags & EFLAGS_CF))
    flags['PF'] = bool((eflags & EFLAGS_PF))
    flags['AF'] = bool((eflags & EFLAGS_AF))
    flags['ZF'] = bool((eflags & EFLAGS_ZF))
    flags['SF'] = bool((eflags & EFLAGS_SF))
    flags['TF'] = bool((eflags & EFLAGS_TF))
    flags['IF'] = bool((eflags & EFLAGS_IF))
    flags['DF'] = bool((eflags & EFLAGS_DF))
    flags['OF'] = bool((eflags & EFLAGS_OF))
    return flags
