Commit Graph

18 Commits

Author SHA1 Message Date
Derek Parker
1b819915fd Remove unused function 2014-12-05 12:39:54 -06:00
Derek Parker
f8bb5acc9b Return more meaningful errors 2014-12-04 15:26:53 -06:00
Derek Parker
d14183a2a2 Fix: do not always use pid thread for clearing bp
Since fixing scheduler handling bugs, a new bug was exposed where Step
was calling Clear off of the DebuggedProcess struct. This is incorrect,
 and should be handled by the thread itself and not delegated.
2014-12-04 15:04:48 -06:00
Derek Parker
afa3a9cc6c Remove timeoutWait due to improved scheduler handling 2014-11-26 20:45:29 -06:00
Derek Parker
36d3ecd6e1 Update documentation 2014-11-24 18:19:40 -06:00
Derek Parker
3b2b17938b Improve support for goroutine context switching
Remove any assumption that a wait syscall on a thread id after a
continue will return. Any time we continue a thread, wait for activity
from any thread, because the scheduler may well have switched contexts
on us due to syscall entrace, channel op, etc...

There are several more things to be done here including:

* Potential tracking of goroutine id as we jump around to thread
  contexts.
* Potential of selectively choosing threads to operate on based on the
  internal M data structures, ensuring that our M has an active G.

This commit partially fixes #23 and #24, however there are still some
random hangs that happen and need to be ironed out.
2014-11-24 17:57:52 -06:00
Derek Parker
8be3ffc774 Refactor: wrap syscall.Wait4
Wrap syscall.Wait4 and cleanup a few coordination issues.

There are still some issues here where background threads are left
sleeping. This could potentially cause weird issues. There are a few
more things I have planned to cleanup thread coordination issues.
2014-11-22 18:57:26 -06:00
Derek Parker
fe24276b15 Use correct tgid for kill in timeoutWait 2014-11-21 15:44:08 -06:00
Michael Gehring
2f91684e7a Don't panic in threads if there is no info for pc 2014-11-12 17:28:28 -06:00
Derek Parker
d2ebf4dc83 Add some documentation 2014-11-08 07:30:22 -06:00
Derek Parker
665ff49181 Add command to print every thread status 2014-11-07 23:55:25 -06:00
Derek Parker
6b2ee09163 Improve overall thread coordination 2014-11-07 23:45:54 -06:00
Derek Parker
4483b17bd6 Synchronize threads better when breakpoint is hit 2014-11-02 12:49:21 -06:00
Derek Parker
f26839d078 Refactor: cleanup path through addThread 2014-10-27 18:10:45 -05:00
Derek Parker
6af32b40e6 cleanup go vet errors 2014-10-25 12:44:35 -05:00
Derek Parker
08aec0d59c Move variable related code to own file 2014-10-25 10:48:14 -05:00
Derek Parker
c625f09a17 Promote breakpoints back up to process 2014-10-25 09:17:05 -05:00
Derek Parker
4c95bf7302 (Mostly) working multithreaded tracing implementation
Areas that need improving:

* Code cleanup
* Promote breakpoints back out of thread context
* Fix potential bug in "Next" implementation, when thread contexts
  switch
2014-10-25 08:59:22 -05:00