How can you slove the warning "warning: GDB: Failed to set controlling terminal: Operation not permitted"?
here: "Fortunately, when I look around, I changed to "printf("%d\n", u)", it works. But printf("%d', u) it doesn't work. Maybe this is the whole problem." Or you should flush the output. Good luck!