Пример #1
0
def checkIfValidBreakPoint(givenHexString):
    startAdd = parsehelper.getStartAddress()
    length = parsehelper.getNumOfInst()
    givenHexInt = int(givenHexString, 16)
    startAddInt = int(startAdd, 16)
    if (givenHexInt - startAddInt) % 4 == 0:
        if (givenHexInt - startAddInt) / 4 < length:
            return True
    return False
Пример #2
0
def checkIfValidBreakPoint(givenHexString):
    startAdd=parsehelper.getStartAddress()
    length=parsehelper.getNumOfInst()
    givenHexInt=int(givenHexString, 16)
    startAddInt=int(startAdd, 16)
    if (givenHexInt-startAddInt)%4 == 0:
        if(givenHexInt-startAddInt)/4 < length:
            return True
    return False
Пример #3
0
def checkIfValidBreakPoint2(givenHexString):
    length = parsehelper.getNumOfInst()
    givenHexInt = int(givenHexString, 16)
    prog_counter = getPC()
    ans = False
    if (givenHexInt - prog_counter) % 4 == 0:
        if (givenHexInt - prog_counter) / 4 < length:
            ans = True
    print 'the value here: ' + str(ans)
    return ans
Пример #4
0
def checkIfValidBreakPoint2(givenHexString):
    length=parsehelper.getNumOfInst()
    givenHexInt=int(givenHexString, 16)
    prog_counter=getPC()
    ans=False
    if (givenHexInt-prog_counter)%4 == 0:
        if (givenHexInt-prog_counter)/4 < length:
            ans=True
    print 'the value here: '+str(ans)
    return ans
Пример #5
0
def parseDataSection(filename):
    #return
    global hexes
    hexes=parsehelper.return_parsed_section(filename, '.data')
    if hexes:
        print 'Data section exists'
        setStartAddress(parsehelper.getStartAddress())
        setNumOfData(parsehelper.getNumOfInst())
        #print hexes
        #print getStartAddress()
        saveAllToMemoryModel()
Пример #6
0
def parseDataSection(filename):
    #return
    global hexes
    hexes = parsehelper.return_parsed_section(filename, '.data')
    if hexes:
        print 'Data section exists'
        setStartAddress(parsehelper.getStartAddress())
        setNumOfData(parsehelper.getNumOfInst())
        #print hexes
        #print getStartAddress()
        saveAllToMemoryModel()
Пример #7
0
def initBkPoint():
    global bkpoint
    length = parsehelper.getNumOfInst()
    bkpoint = [False for x in range(length)]
Пример #8
0
def initBkPoint():
    global bkpoint
    length=parsehelper.getNumOfInst()
    bkpoint= [False for x in range(length)]