def reg_process(dummy, cpu, param): fname = "" try : fname = copyout_str(cpu, cpu.edx) except : cs410_utils.log('410-warning', '410mods-userdebug.py: Unable to read string at %x; not registering process' % cpu.edx) return if fname == "" or '/' in fname: return cr3 = cpu.ecx sname = "prog-"+fname user_process_registry[cr3] = sname # see if symbol table for fname exists. # if not make it and load the symbols. try: SIM_get_object(sname) ### FIXME We would like to empty the symbol table if ### it exists, but we'll do the best we can by reloading ### symbols below. except SimExc_General: cs410_utils.alone(make_new_symtable, sname, fname, cr3) cs410_utils.alone(switch_current_symtable, cpu)
def reg_process(dummy, cpu, param): global user_process_registry fname = "" try : fname = copyout_str(cpu, cpu.edx) except : cs410_utils.log('410-warning', '410mods-userdebug.py: Unable to read string at %x; not registering process' % cpu.edx) return if fname == "" or '/' in fname: return cr3 = cpu.ecx sname = fname+"_prog" user_process_registry[cr3] = sname # see if symbol table for fname exists. # if not make it and load the symbols. try: SIM_get_object(sname) ### FIXME We would like to empty the symbol table if ### it exists, but we'll do the best we can by reloading ### symbols below. except SimExc_General: cs410_utils.alone(make_new_symtable, sname, fname, cr3) cs410_utils.alone(switch_current_symtable, cpu)
def booted(dummy, cpu, param): cs410_dispatch.kernel_up += 1 error = 0 print "%d kernel: up %d" % (cpu.cycles, cs410_dispatch.kernel_up) str_addr = cpu.ecx try : str = cs410_utils.copyout_str(cpu, str_addr) except SimExc_General, e : print "General Exception while reading for set_default_symtab:" print e return
def booted(dummy, cpu, param): cs410_dispatch.kernel_up += 1 error = 0 print "%d kernel: up %d" % (cpu.cycles, cs410_dispatch.kernel_up) str_addr = cpu.ecx try: str = cs410_utils.copyout_str(cpu, str_addr) except SimExc_General, e: print "General Exception while reading for set_default_symtab:" print e return
def lputs(dummy, cpu, param): if cpu.cs[0] & 3: mc = 'udbg' else: mc = 'kdbg' cs410_utils.log(mc, cs410_utils.copyout_str(cpu, cpu.ecx))