Commit Graph

261 Commits

Author SHA1 Message Date
Derek Parker
b86f227ab6 Further improve documentation 2015-04-22 20:01:25 -05:00
Derek Parker
ce01e0f4bc Improve documentation around internal types 2015-04-22 11:42:58 -05:00
Derek Parker
8a7c6a41b8 Code organization 2015-04-20 16:58:49 -05:00
Derek Parker
48d0703b4f Improve 'next' impl for non-go next'ing 2015-04-20 13:03:22 -05:00
Derek Parker
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
Derek Parker
20c9e92cec Improve handling of manual stops 2015-04-13 17:17:06 -05:00
Derek Parker
e5a4a5ae9b Set CurrentBreakpoint on DebuggedProcess 2015-04-09 10:01:58 -05:00
Derek Parker
42a57ad285 Move print goroutine info into command
* DebuggedProcess method: `PrintGoroutinesInfo` -> `GoroutinesInfo`
* `goroutines` command in command/command.go now responsible for
  printing info.
2015-04-09 09:53:02 -05:00
Derek Parker
117d945897 Use curpc for ret offset 2015-04-03 11:55:58 -05:00
Derek Parker
1d99e03f83 Reduce exported members of DebuggedProcess struct 2015-04-03 11:10:35 -05:00
Derek Parker
ccad114ed1 DRY code duplicated across OSes 2015-04-03 10:52:31 -05:00
Derek Parker
e4426fa51f Return breakpoint directly from trapWait 2015-04-03 10:47:27 -05:00
Derek Parker
e7a9daf248 Return thread directly from trapWait 2015-04-03 10:32:43 -05:00
Derek Parker
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
Paul Sbarra
98c054aab4 linux: Don't ask to kill a process that has exited 2015-03-28 15:03:25 -05:00
Derek Parker
0ac24abd2d Validate args to thread command 2015-03-26 13:15:35 -05:00
Derek Parker
0d9b1ed29b Minor function refactor 2015-03-24 08:31:56 -05:00
Derek Parker
684dc92ccd Improve handling of process natural death (OS X) 2015-03-21 17:33:35 -05:00
Derek Parker
6b3d724fdc Return error if thread_resume fails on suspend_count > 0 2015-03-21 17:05:45 -05:00
Derek Parker
530f66dcf6 Remove erroneous vm deallocation 2015-03-21 17:05:13 -05:00
Derek Parker
8ad5639c5e Fix C file formatting 2015-03-21 15:05:09 -05:00
Derek Parker
b8693f6d1a Properly restore vm protections in OS X 2015-03-20 23:48:57 -05:00
Derek Parker
f8a9a410fb Remove MIG generated exception / message handling
This allows greater flexibility for using a port set and determining
whether the wait returned due to a breakpoint or process natural death.
2015-03-20 16:07:26 -05:00
Derek Parker
e616b7fab6 Stop debugged proc on ctrl-c (OS X) 2015-03-13 15:13:41 -05:00
Derek Parker
4729ae828b Allow arbitrary switching between threads 2015-03-13 14:50:01 -05:00
Derek Parker
9f70f43f5c Update thread printing, now denotes current thread
Also refactored code a bit, removed printing functions from proctl
package and inlined them into command.
2015-03-11 18:08:20 -05:00
Derek Parker
11405314d8 Continue thread properly taking into account suspend_count 2015-03-07 18:27:03 -06:00
Derek Parker
0660fcc09b Reap child process for status (OS X) 2015-03-06 17:28:53 -06:00
Ivar Gaitan
8b04d877a0 Handle process natural death a bit better 2015-03-06 17:03:08 -06:00
Derek Parker
f39e134d1d Improve error for HW breakpoint 2015-03-06 08:53:55 -06:00
Derek Parker
0b3cf1cd15 Add command to print active breakpoints 2015-03-06 08:53:54 -06:00
Derek Parker
c4f90625f6 Fix linux build 2015-03-01 11:02:17 -05:00
Derek Parker
562a6fcca0 Fix mach kernal deallocations 2015-03-01 09:46:01 -06:00
Derek Parker
03b17821c8 Inline function 2015-02-28 22:10:39 -06:00
Derek Parker
ac914fe14a Organize code a bit more 2015-02-28 22:08:42 -06:00
Derek Parker
2b76fee539 Inline function 2015-02-28 22:03:26 -06:00
Derek Parker
9f05f444eb Cleanup TODOs 2015-02-28 21:53:26 -06:00
Derek Parker
c7cc84fa83 More cleanup 2015-02-28 21:34:55 -06:00
Derek Parker
0ba45f8487 Cleanup 2015-02-28 21:14:22 -06:00
Derek Parker
cd30ca6cb4 Remove defs file 2015-02-28 21:14:13 -06:00
Derek Parker
4d918aeb2c Handle more kern return values and general cleanup 2015-02-28 10:44:36 -06:00
Derek Parker
b065674fe3 Handle set_pc errors 2015-02-28 10:41:05 -06:00
Derek Parker
636719a4c6 Handle thread_get_state errors 2015-02-28 10:39:21 -06:00
Derek Parker
77725b3d66 Cleanup kernel allocations 2015-02-28 10:35:44 -06:00
Derek Parker
f4ec73bb62 Fix hanging issue on Linux 2015-02-28 09:05:37 -05:00
Derek Parker
27f68abebd Fix Linux panic 2015-02-27 22:35:26 -05:00
Derek Parker
450e5c4805 Fix linux compile errors 2015-02-27 17:13:35 -06:00
Derek Parker
35a0471fd6 Update more exc files for cond compilation 2015-02-27 15:32:47 -06:00
Derek Parker
fc4469b460 Rename exc files for conditional compilation 2015-02-27 15:31:07 -06:00
Derek Parker
7f52928c03 Cleanup of printing and putsing 2015-02-27 15:27:48 -06:00