Modify string output method, and use detach in gdb script