[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
When I debug a multithread program with gdb, and the program often recei
From: |
Zheng Da |
Subject: |
When I debug a multithread program with gdb, and the program often receive signal SIGTRAP |
Date: |
16 May 2005 19:56:15 -0700 |
User-agent: |
G2/0.2 |
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?
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- When I debug a multithread program with gdb, and the program often receive signal SIGTRAP,
Zheng Da <=