78 Commits

Author SHA1 Message Date
ecb8e8a42a Consolidate test support/setup
Add a test support package which allows shared test functionality
for both the unit and integration tests.

Tests importing the proctl/test package will gain access to a special
test entrypoint which precompiles fixtures and makes them available
to tests.
2015-05-04 17:44:40 -05:00
df2fb5f37d Make TestHalt deterministic
Eliminate a race condition in TestHalt where the RequestManualStop
call can precede the Continue call, causing the test to sporadically
fail.
2015-04-26 07:31:28 -04:00
fa9fe1a679 Improve RequestManualStop 2015-04-25 14:25:48 -05:00
da688b8184 Handle runtime.Breakpoint 2015-04-25 14:13:35 -05:00
173ee20097 Fix: properly handle random signals
* Ignore signals we do not care about
* Implement custom fork/exec for Darwin to convert signals to mach
  exceptions
2015-04-25 13:02:45 -05:00
6df90f325d Rename CurrentPC -> PC 2015-04-23 10:40:33 -05:00
58db8322ef Improve chan / goroutine coordination
* Properly find next source line for goroutines blocked in chanrecv
* Refactor breakpoint clearing
* Refactor temp breakpoint setting
2015-04-19 17:15:34 -05:00
20c9e92cec Improve handling of manual stops 2015-04-13 17:17:06 -05:00
1d99e03f83 Reduce exported members of DebuggedProcess struct 2015-04-03 11:10:35 -05:00
86e1530524 Improve next implementation
* Better tracking of current goroutine
* More efficient, eliminates superfluous step syscalls
* Handles concurrency and thread coordination better
2015-03-31 17:12:45 -05:00
0ac24abd2d Validate args to thread command 2015-03-26 13:15:35 -05:00
8b04d877a0 Handle process natural death a bit better 2015-03-06 17:03:08 -06:00
27f68abebd Fix Linux panic 2015-02-27 22:35:26 -05:00
7f52928c03 Cleanup of printing and putsing 2015-02-27 15:27:48 -06:00
2d2d70641e (Mostly) working on OS X 2015-02-27 15:03:06 -06:00
d9c3488f12 Report caller file:line in assert helper fn 2015-01-23 14:55:24 -06:00
fbbe9aaa5e Implement usage of hardware breakpoints
Currently only works for amd64 processors.
2015-01-12 21:56:25 -06:00
709347512c Breakpoints now have ids. Consolidated location lookup logic 2015-01-01 08:23:55 -05:00
9e8ac82104 Minor refactoring / code cleanup 2014-12-28 20:48:58 -06:00
2d21cad8dc Support Go1.4rc1 2014-12-10 22:31:12 -06:00
e0738c417c Remove helper file & further isolate linux code 2014-12-09 10:51:17 -06:00
813340abe6 Remove erroneous stuff from helper package 2014-12-09 10:35:55 -06:00
64e01bfed1 Begin thread code isolation 2014-12-08 17:40:59 -06:00
afa3a9cc6c Remove timeoutWait due to improved scheduler handling 2014-11-26 20:45:29 -06:00
16392ce609 Improve handling of Go runtime scheduler 2014-11-26 20:35:53 -06:00
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
6b2ee09163 Improve overall thread coordination 2014-11-07 23:45:54 -06:00
08aec0d59c Move variable related code to own file 2014-10-25 10:48:14 -05:00
c625f09a17 Promote breakpoints back up to process 2014-10-25 09:17:05 -05:00
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
099efeeb9d Allow evaluation of function params 2014-10-17 14:14:55 -05:00
5331dad93d Rename project 2014-10-15 09:28:22 -05:00
fa0092ac74 Rename helper dir 2014-10-14 09:53:10 -05:00
58c1f54578 Improve Next implementation
Fix bug involving detecting whether or not we have stepped into another
function when we plan on return from the function we are currently in.
2014-10-13 19:04:38 -05:00
dc8c9cc2a4 Optimize Next implementation
Once the program detects that we have stepped into another function,
we simply calculate the return address and then set a breakpoint and
continue to that location, avoiding numerous syscalls.
2014-10-13 08:24:59 -05:00
dfacf0770d Fix wrong location bug for Next impl 2014-10-10 21:00:07 -05:00
8457f5c7df Cleanup test 2014-10-10 13:52:13 -05:00
6a71009954 Fix Next impl
Needs some refactoring and some optimization, but fixes several bugs.
2014-10-09 14:19:10 -05:00
10a1447ae1 Implement support for pointers to structs 2014-10-07 16:22:26 -05:00
f0e0d0b8fd Implement support for struct evaluation 2014-10-07 14:32:22 -05:00
6562b2e531 Do not os.Exit(0) in test 2014-10-07 14:03:44 -05:00
c9cbaea291 Optimize Next implementation
Now that I'm using the step strategy, I put in an optimization where if
stepping into another function, simply find the return address, put a
breakpoint there, and then continue.
2014-10-07 13:57:03 -05:00
a69c2dc994 Cleanup test 2014-10-05 10:53:13 -05:00
2ce7352aa4 Simplify temp breakpoint cleanup 2014-10-04 18:13:20 -05:00
f8a65c41c5 Improve next impl -- needs refactoring 2014-10-04 00:52:40 -05:00
e83e39b158 Fix potential suite hang 2014-09-19 16:01:39 -05:00
8ee9525f47 Ensure temp breakpoints are cleared after next 2014-09-18 22:28:21 -05:00
f1e5a70a4b Update for Go 1.3.1
I decided to vendor all debug/dwarf and debug/elf files so that the
project can be go get-table. All changes that I am waiting to land in Go
1.4 are now captured in /vendor/debug/*.
2014-09-13 12:28:46 -05:00
aefbd8f35a Use consistent fatal test messages 2014-09-06 18:56:25 -05:00
42c98577d8 Use test assertion helper 2014-09-06 18:53:22 -05:00