when I set breakpoint and run, gdb error as following:
Cannot insert breakpoint -2.
Error accessing memory address 0x4000bb50: Input/output error.
The same program may be running in another process.
why?
You have another copy of your program running in your Linux.
Or you didn't compile your program with -g option.
Or you set the breakpoint at a wrong place.
Because you link a share library, and one of your share library may be currently used by another program. So gdb will report you that "The same program may be running in another process."