Commit Graph

15 Commits

Author SHA1 Message Date
Derek Parker
37235bba7f Store hardware/software breakpoints in same struct 2015-06-17 18:14:56 -05:00
Derek Parker
e4fc5e32c2 Refactor: Use thread-locked goroutine for ptrace ops
Previously either the terminal client or the debugger service would
either lock main goroutine to a thread or provide a locked goroutine to
run _all_ DebuggedProcess functions in. This is unnecessary because only
ptrace functions need to be run from the same thread that originated the
PT_ATTACH request.

Here we use a specific thread-locked goroutine to service any ptrace
request. That goroutine is also responsible for the initial spawning /
attaching of the process, since it must be responsible for the PT_ATTACH
request.
2015-06-13 12:57:42 -05:00
Derek Parker
e5233e7262 Rename: s/ThreadContext/Thread/ 2015-06-12 14:51:23 -05:00
Derek Parker
bfca6114d4 Rename package proctl -> proc 2015-06-12 14:49:23 -05:00
Derek Parker
a71f218e35 Rename: s/BreakPoint/Breakpoint/ 2015-06-12 14:48:18 -05:00
Derek Parker
98e7089dd3 Move list of hardware breakpoints onto arch struct
Hardware breakpoints are by definition architecture dependant. Move them
off the DebuggedProcess struct and onto the associated arch struct.
2015-06-12 14:30:59 -05:00
Derek Parker
fe19f3f20c Rename: s/EvalSymbol/EvalVariable/ 2015-06-12 14:04:14 -05:00
Derek Parker
c7dc57d44f Detach from process in tests
Prevents leaving around a bunch of zombie processes
2015-05-27 17:38:53 -05:00
Derek Parker
49667f2302 Rename thread.Process -> thread.dbp
Process is an incorrect name for the DebuggedProcess struct that the
thread is "a part" of. Also, no need to export that field.
2015-05-27 12:16:45 -05:00
Derek Parker
819c476aa9 Do not attempt to automatically read locals/args 2015-05-08 16:43:03 -05:00
Derek Parker
794d5b1e19 Revert errors.New change 2015-05-04 17:31:13 -05:00
Derek Parker
1ad66660a1 Prefer errors.New for unformatted errors 2015-05-01 16:27:29 -05:00
Derek Parker
6cadeb41fc Pass kill signal to ptrace_detach 2015-05-01 15:50:29 -05:00
Derek Parker
9040ec1af1 Only detach if not killing process 2015-05-01 15:14:58 -05:00
Dan Mace
2954e03a20 Introduce client/server separation
Refactor to introduce client/server separation, including a typed
client API and a HTTP REST server implementation.

Refactor the terminal to be an API consumer.
2015-04-29 21:05:41 -05:00