Home » Language IDEs » C / C++ IDE (CDT) » Breakpoints unreliable in multithreaded program
Breakpoints unreliable in multithreaded program [message #852765] |
Sun, 22 April 2012 09:38 |
Paul DeRocco Messages: 22 Registered: April 2012 |
Junior Member |
|
|
I'm using clone() to start a new thread. Breakpoints seem to work at first, but at some point in the execution, they stop working in the first thread, but continue to work in the second thread. When I set a breakpoint on code that is being executed by the first thread, the breakpoint decoration appears, and it is added to the breakpoint list, but the break never occurs. Here's a gdb trace of setting a single breakpoint:
376,073 ~"[Switching to Thread 0xb7feba60 (LWP 4808)]\n"
376,073 *stopped,reason="signal-received",signal-name="SIGINT",signal-meaning="Interrupt",frame={add\
r="0x00130416",func="__kernel_vsyscall",args=[]},thread-id="1",stopped-threads="all",core="0"
376,073 =thread-selected,id="1"
376,073 (gdb)
376,075 72-break-insert --thread-group i1 -f /home/pauld/workspace/chroma/chroma.cpp:134
376,086 72^done,bkpt={number="6",type="breakpoint",disp="keep",enabled="y",addr="0x0804e3bc",func="e\
vent_check(int)",file="../chroma.cpp",fullname="/home/pauld/workspace/chroma/chroma.cpp",line="134",\
times="0",original-location="/home/pauld/workspace/chroma/chroma.cpp:134"}
376,086 =thread-selected,id="2"
376,090 73-exec-continue --thread-group i1
376,090 (gdb)
376,099 73^running
376,099 *running,thread-id="all"
It looks like all threads should be affected by the breakpoint. Anyone have any experience with this?
|
|
| |
Goto Forum:
Current Time: Fri Apr 19 09:27:53 GMT 2024
Powered by FUDForum. Page generated in 0.02032 seconds
|