26 Commits

Author SHA1 Message Date
684dc92ccd Improve handling of process natural death (OS X) 2015-03-21 17:33:35 -05:00
4729ae828b Allow arbitrary switching between threads 2015-03-13 14:50:01 -05:00
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
8b04d877a0 Handle process natural death a bit better 2015-03-06 17:03:08 -06:00
0b3cf1cd15 Add command to print active breakpoints 2015-03-06 08:53:54 -06:00
2b76fee539 Inline function 2015-02-28 22:03:26 -06:00
c7cc84fa83 More cleanup 2015-02-28 21:34:55 -06:00
450e5c4805 Fix linux compile errors 2015-02-27 17:13:35 -06:00
2d2d70641e (Mostly) working on OS X 2015-02-27 15:03:06 -06:00
4d88d9ed8d Prefer binary search over tree lookup for FDEs
FDEs previously were loaded into a red/black tree and searched. This is
significantly more expensive than a binary search over a slice. Not sure
what I was thinking using a red/black tree - this binary search
implementation is significantly more efficient.
2015-02-04 19:22:39 -06:00
aa8ad88965 Improve documentation 2015-02-02 16:09:56 -05:00
e001bbfff2 Fix race between Delve and tracee runtime
This commit fixes a race condition between Delve and the runtime of the traced process. When a new thread is created in the traced process, Delve takes note of it and then continue both the new thread, and the thread that called clone. If Delve attempts to use data in `runtime.allm` before the new `m->procid` is set, errors occur. The errors are due to Delve assuming any m with a procid of 0 is the main thread of the process (due to how theGo runtime allocates M's, only `clone`d threads have procid properly set. This causes certain events (like `next`) to happen twice to the main thread, because 2 m's in `runtime.allm` have a `procid` of 0, and also causes various other issues that prevent proper thread coordination from Delve.

Fixes #43
2015-02-01 13:45:20 -05:00
4f5bfc5ee8 Handle clearing HW breakpoints properly 2015-01-31 20:43:48 -06:00
58de1f7c85 migrate to go.sys subrepository
As of go version 1.4 the standard library syscall package is "locked
down" and code outside of the standard library is recommended to migrate
to the go.sys subrepository.

Reference: https://golang.org/s/go1.4-syscall
2015-01-25 22:43:47 -06:00
ecacbc8a40 Remove bonus comment 2015-01-14 17:40:52 -06:00
bcc4943abd Move breakpointIDCounter to DebuggedProcess struct 2015-01-14 09:01:36 -06:00
d7cb4dcaca Remove parseProcessStatus and only report stop
Currently there is no need for the other items in the ProcessStatus
struct, we really only care if the process is not running, so we can
avoid sending signals to it.
2015-01-14 08:58:32 -06:00
fbbe9aaa5e Implement usage of hardware breakpoints
Currently only works for amd64 processors.
2015-01-12 21:56:25 -06:00
bc39ddfbbc Handle SIGINT
Handle SIGINT by stopping the traced program and then displaying a
prompt to the user for commands. If the traced process is not running,
this is a noop.

Closes #30
2015-01-09 16:24:33 -06:00
eed50f3e52 Kill newline 2015-01-01 12:35:03 -06:00
709347512c Breakpoints now have ids. Consolidated location lookup logic 2015-01-01 08:23:55 -05:00
ed6d4049b6 Extracting common dwarf reader functionality into its own area 2014-12-31 11:46:58 -06:00
2d21cad8dc Support Go1.4rc1 2014-12-10 22:31:12 -06:00
e299dfde08 Isolate linux specific register getters / setters 2014-12-08 17:54:34 -06:00
d41bbbf5c3 Further isolate Linux specific code 2014-12-08 17:15:52 -06:00
53ae81291b Isolate proctl_*.go linux specific code 2014-12-05 16:17:10 -06:00