Closed GoogleCodeExporter closed 9 years ago
Unfortunately, thread support is pretty much in its infancy at the moment for
EDB.
Here's the main problem. Linux (and other OSes with a ptrace style API) don't
debug "processes" they debug threads. So if an application is multi-threaded,
the debugger has to manually attach to all threads, handle the events of all of
these and jump through lots of hoops to get things to work as expected :-(. The
biggest annoyance is that when an event occurs, the debugger needs to send a
stop signal to every other thread and wait for them to stop (what if one of
them crashes or doesn't stop for some reason).
Currently when you attach to a process with EDB, it simply attaches the PID of
the application (the main thread). It does not (yet) attach to any child
threads.
So if you put a breakpoint that gets hit by any thread except for the main
thread, that thread will receive a trap event which will go unhanded (no
debugger attached!) which will end the process.
Eventually EDB will handle this correctly (this is considered a blocker for
1.0) but currently it doesn't.
Original comment by evan.teran
on 3 Oct 2012 at 4:54
Issue 78 has been merged into this issue.
Original comment by evan.teran
on 3 Oct 2012 at 4:55
This is handled much better in the current code and works mostly correctly.
Original comment by evan.teran
on 3 Oct 2012 at 4:56
While I'm sure that there is room for improvement, multi-threaded applications
are much better supported than they were when this was originally reported.
Original comment by evan.teran
on 18 Jan 2014 at 4:34
While I'm sure that there is room for improvement, multi-threaded applications
are much better supported than they were when this was originally reported.
Original comment by evan.teran
on 18 Jan 2014 at 4:35
Original issue reported on code.google.com by
evan.teran
on 3 Oct 2012 at 3:21