Commit Graph

184 Commits

Author SHA1 Message Date
Derek Parker
fa62905a7e Remove slight duplication 2015-01-14 17:36:35 -06:00
Derek Parker
bcc4943abd Move breakpointIDCounter to DebuggedProcess struct 2015-01-14 09:01:36 -06:00
Derek Parker
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
Derek Parker
fbbe9aaa5e Implement usage of hardware breakpoints
Currently only works for amd64 processors.
2015-01-12 21:56:25 -06:00
Derek Parker
c0ae1ee1c6 Remove erroneous fmt.Println calls 2015-01-10 14:33:49 -06:00
Derek Parker
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
Derek Parker
6acb912a0c Minor comment cleanup 2015-01-02 10:09:32 -06:00
epipho
7c61e2a1cb EvalSymbol supports evaluating struct members on pointers. Fixed panic
when evaluating a nil pointer.
2015-01-02 10:02:56 -06:00
Derek Parker
eed50f3e52 Kill newline 2015-01-01 12:35:03 -06:00
epipho
709347512c Breakpoints now have ids. Consolidated location lookup logic 2015-01-01 08:23:55 -05:00
Derek Parker
1289f38f87 kill whitespace 2014-12-31 15:54:52 -06:00
epipho
2c5527c6c9 Refactor member variable evaluation so it works in all cases 2014-12-31 16:20:26 -05:00
epipho
ed6d4049b6 Extracting common dwarf reader functionality into its own area 2014-12-31 11:46:58 -06:00
epipho
c0fd1a0295 Refactor extractValue so OP_DW_addr will work 2014-12-31 02:41:25 -05:00
epipho
07940dc59e Added info locals and info args commands 2014-12-30 12:58:44 -05:00
Derek Parker
cc8563a2a2 Remove unnecessary type conversion 2014-12-30 09:23:22 -06:00
Derek Parker
849a201d4a Extract function to set slice len 2014-12-29 21:05:22 -06:00
Derek Parker
4dce356497 Slight improvement for readIntSlice 2014-12-29 20:59:52 -06:00
Derek Parker
d7684de92d Use ptrsize instead of assuming 2014-12-29 17:04:08 -06:00
Derek Parker
46be509d6a Improve array type output 2014-12-29 16:59:41 -06:00
Derek Parker
623ec5e53d Improve array evaluation support
* First of a few commits to allow for evaluating arrays of arbitrary
  types
* Adds support for 32 bit integer arrays
2014-12-28 22:37:18 -06:00
Derek Parker
9e8ac82104 Minor refactoring / code cleanup 2014-12-28 20:48:58 -06:00
Derek Parker
04da3fcbc8 Don't assume pointer size 2014-12-19 23:10:32 -06:00
Derek Parker
8e40467c95 Use ByteSize for reading string size 2014-12-19 23:10:32 -06:00
Derek Parker
2d21cad8dc Support Go1.4rc1 2014-12-10 22:31:12 -06:00
Derek Parker
e0738c417c Remove helper file & further isolate linux code 2014-12-09 10:51:17 -06:00
Derek Parker
813340abe6 Remove erroneous stuff from helper package 2014-12-09 10:35:55 -06:00
Derek Parker
12949e3406 Remove linux build requirement on variables source file 2014-12-08 22:33:52 -06:00
Derek Parker
460bedf4f4 Use generic ReadMemory isntead of Ptrace 2014-12-08 22:31:51 -06:00
Derek Parker
e784e5d56d Isolate linux specific memory reading in threads file 2014-12-08 17:56:02 -06:00
Derek Parker
e299dfde08 Isolate linux specific register getters / setters 2014-12-08 17:54:34 -06:00
Derek Parker
64e01bfed1 Begin thread code isolation 2014-12-08 17:40:59 -06:00
Derek Parker
d41bbbf5c3 Further isolate Linux specific code 2014-12-08 17:15:52 -06:00
Derek Parker
2ecf625c5b Remove unused struct member 2014-12-08 12:15:08 -06:00
Derek Parker
53ae81291b Isolate proctl_*.go linux specific code 2014-12-05 16:17:10 -06:00
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
a039e5a93d Add basic support for evaluating struct members 2014-12-02 23:30:39 -06:00
Derek Parker
46760aaa1c Rename fn for clarity 2014-12-02 16:44:51 -06:00
Derek Parker
2046bc8192 Check for err on Dwarf fn seek 2014-12-02 16:42:50 -06:00
Derek Parker
67e2455caf Fix format string 2014-12-02 12:42:17 -06:00
Derek Parker
5ece8d3b69 Use allm info to attach to existing threads
This remove reliance on the procfs for figuring out what threads are
already active when we attach to a running process. The allm linked list
will be present to matter what OS we're on, whereas procfs will not be
present everywhere.

This is the first in a series of steps to support more platforms.
2014-12-02 10:15:51 -06:00
Derek Parker
74defb1028 Remove unused struct 2014-11-28 20:16:46 -06:00
Derek Parker
afa3a9cc6c Remove timeoutWait due to improved scheduler handling 2014-11-26 20:45:29 -06:00
Derek Parker
16392ce609 Improve handling of Go runtime scheduler 2014-11-26 20:35:53 -06:00
Derek Parker
13a3112b6b Improve Go 1.4 support / cleanup goroutine printing 2014-11-25 20:37:43 -06:00
Derek Parker
04097af74d Avoid carrying closure around with goroutine 2014-11-25 09:22:34 -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