If I want to debug a segment of code in my program, and the code will run in two threads simultaneously. When I set a breakpoint in the code, and run the program step by step from the breakpoint in the code, the program often receive the signal SIGTRAP. At first I thought after a thread ran to the breakpoint and stop, and the other thread would run to the breakpoint and stop too, so it would make confusing.So I set the breakpoint with tbreak. But the program still received the signal SIGTRAP when debugged. How to debug such code with gdb?
_______________________________________________ help-gnu-utils mailing list help-gnu-utils@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-utils