After I set breakpoint, the gdbserver will go wrong. In gdb side will complain that "PC register is not avaliable".
This is main problem this week I meet. Now the gdb can attach to the gdbserver, and run the continue command. Sadly to say, it just can resume the inferior one time because can't set breakpoint yet.
I think the problem is in fetch_register(), I will solve this soon.
(not finished...)