Add gdb stub for debug
change IO indicator name
Fix some bugs