def getInstructionPointer(registerMap):
    """
        Return the instruction pointer value from the given register map

        @type registerMap: map
        @param registerMap: Map of register names to value

        @rtype: int
        @return: The value of the instruction pointer
    """
    for reg in ['rip', 'eip', 'pc']:
        if reg in registerMap:
            return registerMap[reg]
    raise RuntimeError(
        'Register map does not contain a usable instruction pointer!')
