Exemple #1
0
         print "No register/address specified."
 
 elif input[0] == "r" or input[0] == "run":
     c.reset()
     c.run()
 
 elif input[0] == "regs":
     c.print_regs()
 
 elif input[0] == "reset":
     c.reset()
 
 elif input[0] == "t" or input[0] == "trace":
     if len(input) > 1:
         if input[1] == "on" or input[1] == "On" or input[1] == "1":
             c.set_trace(1)
             print "Trace is now on."
         elif input[1] == "off" or input[1] == "Off" or input[1] == "0":
             c.set_trace(0)
             print "Trace is now off."
     else:
         print "You must set trace to \"on\" or \"off\"."
 
 elif input[0] == "w" or input[0] == "watch":
     if len(input) > 1:
         c.add_watchpoint(input[1:])
     else:
         watchpoints = c.list_watchpoints()
         if len(watchpoints) > 0:
             for i in range(len(watchpoints)):
                 print i+1, "\t", hex(watchpoints[i])