Exemple #1
0
    print "No cpu loaded."

print "AUA interactive debugging shell 0.1"

c = Cpu()
c.load("../../as/boot")
input = readline.get_line_buffer()
while len(input) == 0 or input[0] != "q":
    
    if len(input) > 0:
        
        if input[0] == "b":
            if len(input) > 1:
                c.add_breakpoint(input[1:])
            else:
                breakpoints = c.list_breakpoints()
                if len(breakpoints) > 0:
                    for i in range(len(breakpoints)):
                        print i+1, "\t", hex(breakpoints[i])
                        
                else:
                    print "No breakpoints have been set yet."
        
        elif input[0] == "bt":
            c.print_backtrace()
        
        elif input[0] == "c" or input[0] == "continue":
            c.run()
        
        elif input[0] == "d" or input[0] == "delete":
            if len(input) > 1: